mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 17:46:05 -05:00
FIX: missing site id lookup causing message bus cross talk in multisite
This commit is contained in:
parent
2cc95af69b
commit
d8795a5345
1 changed files with 9 additions and 3 deletions
|
@ -1,6 +1,11 @@
|
|||
MessageBus.site_id_lookup do
|
||||
MessageBus.site_id_lookup do |env=nil|
|
||||
if env
|
||||
setup_message_bus_env(env)
|
||||
env["__mb"][:site_id]
|
||||
else
|
||||
RailsMultisite::ConnectionManagement.current_db
|
||||
end
|
||||
end
|
||||
|
||||
def setup_message_bus_env(env)
|
||||
return if env["__mb"]
|
||||
|
@ -26,7 +31,8 @@ def setup_message_bus_env(env)
|
|||
},
|
||||
user_id: user_id,
|
||||
group_ids: group_ids,
|
||||
is_admin: is_admin
|
||||
is_admin: is_admin,
|
||||
site_id: RailsMultisite::ConnectionManagement.current_db
|
||||
|
||||
}
|
||||
env["__mb"] = hash
|
||||
|
|
Loading…
Reference in a new issue