@logger.info'New message from [%s] to [%s]'%[msg.from,msg.to]
returnself.process_internal_command(msg.from.bare,msg.first_element_text('body'))ifmsg.to==@@transport.jid# treat message as internal command if received as transport jid
return@sessions[msg.from.bare].queue_message(msg.to.to_s,msg.first_element_text('body'))if@sessions.key?msg.from.bare# queue message for processing session is active for jid from
return@sessions[msg.from.bare].queue_message(msg.to.to_s,msg.first_element_text('body'))if@sessions.key?msg.from.bareand@sessions[msg.from.bare].online?# queue message for processing session is active for jid from
end
# process internal /command #
@ -45,6 +45,9 @@ class XMPPComponent
when'/code','/password'
# we will pass auth data to user session if this session exists.