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:
David Taylor
2021-08-19 13:04:31 +01:00
committed by GitHub
parent ec352a1969
commit 5eb4e642a6
3 changed files with 32 additions and 32 deletions

View File

@ -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