mirror of
https://github.com/discourse/discourse.git
synced 2025-06-04 11:11:13 +08:00
DEV: Introduce Chat Notices with publishing method (#22369)
This commit is contained in:

committed by
GitHub

parent
c6cd3af5b5
commit
3171fd1a0a
@ -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)
|
||||
|
Reference in New Issue
Block a user