DEV: Introduce Chat Notices with publishing method (#22369)

This commit is contained in:
Mark VanLandingham
2023-07-06 08:26:25 -05:00
committed by GitHub
parent c6cd3af5b5
commit 3171fd1a0a
12 changed files with 193 additions and 37 deletions

View File

@ -475,6 +475,12 @@ module Chat
)
end
def self.publish_notice(user_id:, channel_id:, text_content:)
payload = { type: "notice", text_content: text_content, channel_id: channel_id }
MessageBus.publish("/chat/#{channel_id}", payload, user_ids: [user_id])
end
private
def self.permissions(chat_channel)