changed messge recv type attr to message_type

This commit is contained in:
İsmail Başaran 2016-03-24 18:35:43 +02:00
parent 510b15f1df
commit cea2afccc6

View file

@ -105,9 +105,9 @@ class Messager(slixmpp.ClientXMPP):
def recv_direct_message(self, msg): def recv_direct_message(self, msg):
if msg['type'] in ('chat', 'normal'): if msg['type'] in ('chat', 'normal'):
j = json.loads(str(msg['body'])) j = json.loads(str(msg['body']))
type = j['type'] message_type = j['type']
self.logger.debug('[Messager] Fired event is: ' + type) self.logger.debug('[Messager] Fired event is: ' + message_type)
self.event_manger.fireEvent(type, str(msg['body'])) self.event_manger.fireEvent(message_type, str(msg['body']))
def connect_to_server(self): # Connect to the XMPP server and start processing XMPP stanzas. def connect_to_server(self): # Connect to the XMPP server and start processing XMPP stanzas.
try: try: