Skip to content

Attribute broadcasts to their sender via message metadata - #75

Merged
3kh0 merged 1 commit into
hackclub:mainfrom
jeremy46231:attribute-broadcasts-metadata
Sep 1, 2026
Merged

Attribute broadcasts to their sender via message metadata#75
3kh0 merged 1 commit into
hackclub:mainfrom
jeremy46231:attribute-broadcasts-metadata

Conversation

@jeremy46231

Copy link
Copy Markdown
Contributor

Adds .metadata.event_payload.source_user_id to the /pro channel and /pro here messages, which post with the caller's name and avatar via chat:write.customize.

@@ -26,6 +26,10 @@ export default {
         text,
         username: u.profile.display_name || u.real_name || u.name,
         icon_url: u.profile.image_192,
+        metadata: {
+          event_type: "pro_here_message",
+          event_payload: { source_user_id: cmd.user_id },
+        },
         blocks: [{ type: "section", text: { type: "mrkdwn", text } }],
       };

Same change in channel.js with event_type: "pro_channel_message".

This is for ShowRealUser in Taut (it renders bot-sent messages as the user that actually sent them), and it's also useful for this metadata to exist for other uses. The same change is already merged in at-channel and others.

@3kh0 3kh0 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.

#sponsored by taut

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.

2 participants