... | ... |
@@ -21,7 +21,7 @@ class WsController < WebsocketRails::BaseController |
21 | 21 |
|
22 | 22 |
def where_i_am_multichat_owner |
23 | 23 |
chats_owner = {} |
24 |
- connection_store[:clients].each do |client| |
|
24 |
+ connection_store[:clients] && connection_store[:clients].each do |client| |
|
25 | 25 |
connection_store[:opened_chats][client].each do |chat_id, contacts| |
26 | 26 |
if contacts[:owner] == client.jid.strip.to_s |
27 | 27 |
chats_owner[client] = chat_id |