Skip to content

fix(instagram): allow disconnecting and reconnecting a channel - #1783

Merged
viethung0o0 merged 1 commit into
mainfrom
fix/instagram-connect-disconnect
Nov 25, 2026
Merged

viethung0o0 merged 1 commit into
mainfrom
fix/instagram-connect-disconnect

Conversation

@viethung0o0

Copy link
Copy Markdown
Contributor

Summary

  • Disconnecting Instagram no longer gets stuck when Meta says the app is already uninstalled.
  • A disconnected Instagram account can be connected again with the other login type.
  • Unexpected duplicate errors on connect are now logged without sensitive values.

Test plan

  • Lint, type-check and tests pass for the affected packages
  • Database test covers switching the login type both ways
  • Manually disconnect and reconnect a real Instagram account

@github-actions github-actions Bot added the bug Something isn't working as expected label Nov 25, 2026
@viethung0o0
viethung0o0 marked this pull request as ready for review November 25, 2026 18:53
@viethung0o0
viethung0o0 merged commit f6fddff into main Nov 25, 2026
15 checks passed
sung17 pushed a commit to gitpascal/ChatbotX that referenced this pull request Nov 26, 2026
Resolve conflicts with ChatbotXIO#1769, ChatbotXIO#1776 and ChatbotXIO#1783:
- keep grantedScopes from the direct code exchange next to loginType
- route main's new post listing/management calls (me/media, me/stories,
  managed media) through the login-type-aware Graph client
- keep the AhaChat import availability wrapper on the Instagram picker
- merge the connectSessions.get description with main's selectable guidance

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sung17 pushed a commit to gitpascal/ChatbotX that referenced this pull request Nov 26, 2026
…ublishing

Unified Login channels still reached graph.instagram.com, which rejects the
system-user token, in several paths:

- coexist history sync and contact scan: pass loginType to the sync APIs
- multi-account picker: connect through the direct-login route; the
  instagram-facebook route rejects an `instagram` connect session
- Reconnect button (ChatbotXIO#1783): open Unified Login when the credential has a
  configuration, exchange the code on graph.facebook.com, match the stored
  igId among the assigned accounts and keep loginType
- live_comments subscription: pass loginType
- post publishing: publish Unified inboxes with the graph.facebook.com
  publisher (isInstagramOnFacebookGraph)

Also fix the select-page test that broke when the page started using
getTranslations, and cover each path above with tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working as expected

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants