mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 05:01:14 +08:00
DEV: Rename discourse-presence endpoints and messagebus channels (#14089)
We are working to introduce a general core API for presence, which will clash with this plugin's `/presence` namespace This commit introduces no functional change. There may be a slight interruption in discourse-presence functionality during a deploy of this commit.
This commit is contained in:
@ -15,7 +15,7 @@ PLUGIN_NAME ||= -"discourse-presence"
|
||||
|
||||
after_initialize do
|
||||
|
||||
MessageBus.register_client_message_filter('/presence/') do |message|
|
||||
MessageBus.register_client_message_filter('/presence-plugin/') do |message|
|
||||
published_at = message.data["published_at"]
|
||||
|
||||
if published_at
|
||||
@ -146,7 +146,7 @@ after_initialize do
|
||||
payload[:post_id] = post_id
|
||||
end
|
||||
|
||||
MessageBus.publish("/presence/#{topic_id}", payload, opts)
|
||||
MessageBus.publish("/presence-plugin/#{topic_id}", payload, opts)
|
||||
|
||||
render json: success_json
|
||||
end
|
||||
@ -172,7 +172,7 @@ after_initialize do
|
||||
end
|
||||
|
||||
Discourse::Application.routes.append do
|
||||
mount ::Presence::Engine, at: '/presence'
|
||||
mount ::Presence::Engine, at: '/presence-plugin'
|
||||
end
|
||||
|
||||
end
|
||||
|
Reference in New Issue
Block a user