Skip to content

feat(push): read a workspace chat message by id for the mobile push banner - #177

Closed
aaron-tsar wants to merge 1 commit into
previewfrom
feat/push-channel-get-message
Closed

aaron-tsar wants to merge 1 commit into
previewfrom
feat/push-channel-get-message

Conversation

@aaron-tsar

Copy link
Copy Markdown
Contributor

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_message on the sender's database; workspace and folder chat had no single-row read.

What

  • hub/procedures/channel/channel_get_message.sql — one channel row by message_id (message_id, author_id, message, thread_id, attachment), status != 'trashed' so a deleted message is never quoted after the fact. Mirrors p2p_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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread patches/manifest.txt
patches/funnel_backfill.sql
yellow_page/tables/feature_usage.sql
yellow_page/procedures/analytics/feature_mark.sql
hub/procedures/channel/channel_get_message.sql

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge 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 👍 / 👎.

@aaron-tsar
aaron-tsar changed the base branch from main to preview September 8, 2026 17:37
…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.
@aaron-tsar

Copy link
Copy Markdown
Contributor Author

Superseded by #187, which carries this change cherry-picked onto preview together with the other two open PRs.

@aaron-tsar aaron-tsar closed this Sep 22, 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.

1 participant