feat(push): read a workspace chat message by id for the mobile push banner - #177
aaron-tsar wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 006ff85e3f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| patches/funnel_backfill.sql | ||
| yellow_page/tables/feature_usage.sql | ||
| yellow_page/procedures/analytics/feature_mark.sql | ||
| hub/procedures/channel/channel_get_message.sql |
There was a problem hiding this comment.
Deploy the lookup to existing organization workspaces
When this manifest is applied, the hub/ prefix makes bin/patch-from-manifest select the hub target, while bin/patch.js::select_schemas restricts that target to entities whose type is exactly hub. Existing organization workspaces are pooled hub databases that organisation_create retypes to organization, so they still contain workspace channels but never receive channel_get_message; the push worker's lookup will therefore fail with a missing procedure for messages from those workspaces. Deploy this routine to both hub and organization schemas, as the common target already does for shared routines.
Useful? React with 👍 / 👎.
…anner The mobile push worker now quotes the message a chat.post or channel.post event is about, at delivery time, so the queue keeps carrying identifiers only. Direct messages already had p2p_get_message on the sender's database; this is its counterpart on the hub: one channel row by message_id, trashed rows excluded so a deleted message is never quoted after the fact.
006ff85 to
0883fab
Compare
|
Superseded by #187, which carries this change cherry-picked onto preview together with the other two open PRs. |
Why
The mobile push banner for a chat message now reads sender / "To " / message excerpt (server-team change, same date). The push queue and Redis deliberately carry identifiers only, so the worker reads the message text at delivery time through a stored procedure. Direct messages already had
p2p_get_messageon the sender's database; workspace and folder chat had no single-row read.What
hub/procedures/channel/channel_get_message.sql— onechannelrow bymessage_id(message_id, author_id, message, thread_id, attachment),status != 'trashed'so a deleted message is never quoted after the fact. Mirrorsp2p_get_message.patches/manifest.txt— entry appended.Stage
Applied on drumee.in to every database that holds
channel_post_message(1620 schemas, 0 failures) on 2026-09-09.