Skip to content

Fall back to display name when a published-post email has no username - #325

Merged
paulocastellano merged 3 commits into
mainfrom
fix/post-published-email-empty-handle
Sep 3, 2026
Merged

Fall back to display name when a published-post email has no username#325
paulocastellano merged 3 commits into
mainfrom
fix/post-published-email-empty-handle

Conversation

@paulocastellano

Copy link
Copy Markdown
Contributor

Summary

  • Facebook Pages often have no vanity username (InboxPlacement.io is null in prod), so the published-post email rendered Facebook Page (@).
  • SocialAccount::labeledHandle() now uses username, then display name, and drops the empty (@) when both are missing — same rule for the failed-post email and the in-app notification.

Test plan

  • Publish a Facebook Page post whose account has username = null and a display name — email should show Facebook Page (@InboxPlacement.io), not Facebook Page (@)
  • Publish a Bluesky post with empty display name — email should show Bluesky (@handle)
  • Confirm a network with both fields still prefers the username

Facebook Pages often have no vanity username, which left the email as "Facebook Page (@)". Use username, then display name, and omit the empty parentheses when both are missing.
The fallback belongs on the row that always has a platform, so mail and in-app notify can call one method instead of guarding a missing social account at every call site.
The email tests were not enough — SendNotification body is what the in-app inbox shows, and that path also goes through notificationLabel().
@paulocastellano
paulocastellano merged commit abe687d into main Sep 3, 2026
5 checks passed
@paulocastellano
paulocastellano deleted the fix/post-published-email-empty-handle branch September 3, 2026 15:51
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.

1 participant