comparison src/plugins/plugin_exp_parrot.py @ 1358:bf3f669a6052 frontends_multi_profiles

plugins XEP-0045, XEP-0249, parrot: use JID instead of unicode in many methods + class attributes
author souliane <souliane@mailoo.org>
date Wed, 11 Mar 2015 12:35:21 +0100
parents 301b342c697a
children 0befb14ecf62
comparison
equal deleted inserted replaced
1357:f296a54af386 1358:bf3f669a6052
89 entity_type = self.host.memory.getEntityData(from_jid, ['type'], profile)["type"] 89 entity_type = self.host.memory.getEntityData(from_jid, ['type'], profile)["type"]
90 except (UnknownEntityError, KeyError): 90 except (UnknownEntityError, KeyError):
91 entity_type = "contact" 91 entity_type = "contact"
92 if entity_type == 'chatroom': 92 if entity_type == 'chatroom':
93 src_txt = from_jid.resource 93 src_txt = from_jid.resource
94 if src_txt == self.host.plugins["XEP-0045"].getRoomNick(from_jid.userhost(), profile): 94 if src_txt == self.host.plugins["XEP-0045"].getRoomNick(from_jid.userhostJID(), profile):
95 #we won't repeat our own messages 95 #we won't repeat our own messages
96 return True 96 return True
97 else: 97 else:
98 src_txt = from_jid.user 98 src_txt = from_jid.user
99 msg = "[%s] %s" % (src_txt, mess_body) 99 msg = "[%s] %s" % (src_txt, mess_body)