You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have the following method in a class called Chat. As the name suggests, the method intends to create a chat room for a set of usernames passed, along with configurations for the room. But the statement "chat_client.auth" gets stuck at times. I am saying this because the last log I see is "**Authorizing client". Is there something that I am not doing right?
def self.create_room_for(options)
Rails.logger.info "\n**Creating room for #{options}\n"
chat_room_name = "#{options[:chat_usernames].join('_')}@conference.#{CHAT_SERVER_DOMAIN}/localclient"
begin
chat_username = options[:chat_usernames].first
Rails.logger.info "Creating JID"
chat_client = Jabber::Client.new(Jabber::JID::new("#{chat_username}@#{CHAT_SERVER_DOMAIN}"))
Rails.logger.info "Connecting to Chat server"
chat_client.allow_tls = false
chat_client.connect
Rails.logger.info "\n**Authorizing client\n" #Nothing gets logged beyond this
chat_client.auth("some_password")
muc = Jabber::MUC::MUCClient.new(chat_client)
Rails.logger.info "\n**Joining room\n"
muc.join(Jabber::JID::new(chat_room_name))
muc.configure("muc#roomconfig_persistentroom" => 1, "muc#roomconfig_enablelogging" => 1, "muc#roomconfig_publicroom" => options[:public_room]) if muc.owner?
rescue Exception => e
Airbrake.notify(e)
ensure
muc.exit
chat_client.close
end
end
The text was updated successfully, but these errors were encountered:
I have the following method in a class called Chat. As the name suggests, the method intends to create a chat room for a set of usernames passed, along with configurations for the room. But the statement "chat_client.auth" gets stuck at times. I am saying this because the last log I see is "**Authorizing client". Is there something that I am not doing right?
The text was updated successfully, but these errors were encountered: