Skip to content

Attribute support replies to their sender via message metadata - #428

Merged
aaravjhamb merged 1 commit into
hackclub:mainfrom
jeremy46231:attribute-support-replies-metadata
Sep 2, 2026
Merged

Attribute support replies to their sender via message metadata#428
aaravjhamb merged 1 commit into
hackclub:mainfrom
jeremy46231:attribute-support-replies-metadata

Conversation

@jeremy46231

Copy link
Copy Markdown
Contributor

Adds .metadata.event_payload.source_user_id wherever the support relay posts with a custom name and avatar.

       username: display_name,
-      icon_url: avatar_url
+      icon_url: avatar_url,
+      metadata: {
+        event_type: "forge_message",
+        event_payload: { source_user_id: slack_user_id }
+      }
     )

Same in admin/support_tickets_controller.rb. slack-ruby-client JSON-encodes metadata itself, same as blocks.

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 thing is already in at-channel, prometheus, slack-extra and others.

@aaravjhamb
aaravjhamb merged commit 6063454 into hackclub:main Sep 2, 2026
5 of 7 checks passed
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