Browse code

FIX: pristup k neinicializovanemu objektu

Cinan Rakosnik authored on 06/05/2013 at 17:00:15
Showing 1 changed files
... ...
@@ -21,10 +21,13 @@ class WsController < WebsocketRails::BaseController
21 21
 
22 22
     def where_i_am_multichat_owner
23 23
         chats_owner = {}
24
-        connection_store[:clients].is_a? Array && connection_store[:clients].each do |client|
25
-            connection_store[:opened_chats][client].each do |chat_id, contacts|
26
-                if contacts[:owner] == client.jid.strip.to_s
27
-                    chats_owner[client] = chat_id
24
+
25
+        if connection_store[:opened_chats]
26
+            connection_store[:clients].each do |client|
27
+                connection_store[:opened_chats][client].each do |chat_id, contacts|
28
+                #    if contacts[:owner] == client.jid.strip.to_s
29
+                #        chats_owner[client] = chat_id
30
+                #    end
28 31
                 end
29 32
             end
30 33
         end