Skip to content

push,messagix: add native Messenger Android push registration - #351

Merged
iFixRobots merged 12 commits into
mainfrom
codex/messenger-local-push
Sep 15, 2026
Merged

iFixRobots merged 12 commits into
mainfrom
codex/messenger-local-push

Conversation

@iFixRobots

@iFixRobots iFixRobots commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Problem

Cookie-only Messenger sessions cannot register native encrypted push notifications.

Fix

Prefer the Messenger Android login flow. Preserve native credentials, device identity and push keys, and register FCM with Graph and the encrypted connection. Keep the existing iOS cookie login behavior.

Handle native relay payloads through background sync, return failed or incomplete catch-up for retry, retain messages when chat sync fails, and reject invalid push data before indexing it.

Notes

Existing cookie-only connections must log in again with Messenger Android. Beeper must promote bridge:local-facebook:login:messenger-lite-android for automatic selection; the existing iOS login flag otherwise takes precedence. Cached relay registrations must renew through the SDK's trusted re-registration event or normal expiry before selecting FCM. This uses existing client APIs.

Beeper relay support requires push-receiver#4, included in hungryserv#588.

Build and vet pass. A normal Pixel login registered its own push keys. A real encrypted provider push, forwarded with the existing relay serializer, produced a Beeper notification while the app was in the background. Replaying it after process death restarted the bridge without duplicate messages or notifications. These checks used a controlled relay forward; automatic server forwarding and iOS delivery still need release verification.

@iFixRobots iFixRobots changed the title connector: handle failed chat syncs and invalid push data connector: handle failed syncs and invalid push data Sep 12, 2026
@iFixRobots iFixRobots changed the title connector: handle failed syncs and invalid push data connector: add native Messenger push notifications Sep 12, 2026
@tulir tulir changed the title connector: add native Messenger push notifications push,messagix: add native Messenger Android push registration Sep 15, 2026
Comment thread pkg/connector/login.go Outdated
Comment thread pkg/connector/push.go Outdated
log.Warn().
Str("message_id", msgID).
Msg("Push message still wasn't bridged after backfill")
return fmt.Errorf("push message %s wasn't bridged after backfill", msgID)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, returning an error for this might just cause loops where it tries handling the same push over and over even if it's never going to work

@tulir tulir left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, other than that one error return which might be best to revert to a log

@iFixRobots
iFixRobots merged commit 1507bf2 into main Sep 15, 2026
11 checks passed
@iFixRobots
iFixRobots deleted the codex/messenger-local-push branch September 15, 2026 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants