Skip to content

fix(messenger): unread badge for facebook.com/messages and messenger-only accounts - #743

Open
nexxai wants to merge 1 commit into
ferdium:mainfrom
nexxai:fix/messenger-unread-facebook-messages
Open

fix(messenger): unread badge for facebook.com/messages and messenger-only accounts#743
nexxai wants to merge 1 commit into
ferdium:mainfrom
nexxai:fix/messenger-unread-facebook-messages

Conversation

@nexxai

@nexxai nexxai commented Aug 28, 2026

Copy link
Copy Markdown

Pre-flight Checklist

Please ensure you've completed all of the following.

Description of Change

Moving serviceURL to https://facebook.com/messages (1.8.6) broke the unread badge — a[href^='/t/'][role='link'] no longer matches /messages/t/ and querySelector(...).ariaLabel throws on null, aborting getMessages() before Ferdium.setBadge(). It also broke login for messenger-only accounts with no Facebook profile.

Fix: revert serviceURL to https://messenger.com and make webview.js handle both hosts. Fixes null crash with optional chaining, adds /messages/t/ and /messages/requests/t/ prefixes, adds facebook.com/messages detection via [data-testid="mwthreadlist-item"] (is6700om/o48pnaf2/lrazzd5p) plus generic [aria-label*="unread"] and document.title (N) fallback, and keeps legacy .bp9cbjyn path. Both messenger.com and facebook.com/messages (if user sets custom URL) now count correctly.

Bumped to 1.8.7. Verified locally via hot-patch in ~/Library/Application Support/Ferdium/recipes/messenger/ (badge 0→1 after receiving message) and pnpm lint:fix && pnpm reformat-files && pnpm package passes (438 recipes, 0 failures).

Closes ferdium/ferdium-app#2416

…nd facebook.com/messages

Reverts serviceURL to https://messenger.com to fix login for messenger-only
accounts (fixes ferdium/ferdium-app#2397) and restores unread counting that
broke after moving to facebook.com/messages (fixes ferdium/ferdium-app#2416).

On facebook.com/messages the thread list does not expose unread via the old
messenger.com selectors. The new webview:
- fixes crash where querySelector(...).ariaLabel threw on null
- supports both /t/ and /messages/t/ prefixes (and requests/marketplace)
- adds facebook.com/messages detection via [data-testid="mwthreadlist-item"]
  with unread indicators (.is6700om, .lrazzd5p, .o48pnaf2 etc.)
- keeps legacy .bp9cbjyn fallback for messenger.com
- adds generic aria-label and document.title fallbacks
- handles message-requests via additional selectors
- wraps counting in try/catch so loop never breaks

Bump version 1.8.6 -> 1.8.7.
@nexxai nexxai changed the title Fix Messenger unread badge for facebook.com/messages and messenger-only accounts fix(messenger): unread badge for facebook.com/messages and messenger-only accounts Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Messenger (FB) service no longer shows Unread count

1 participant