# HG changeset patch # User Goffi # Date 1473458073 -7200 # Node ID d443607632620015dea3999bea439ec24c20298e # Parent 9dd76a5b63bab376c23de703c0c3731bdc1eb108 plugin XEP-0054: renamed isInRoom to isRoom as the method only tell if the entity belong to a MUC diff -r 9dd76a5b63ba -r d44360763262 src/plugins/plugin_xep_0054.py --- a/src/plugins/plugin_xep_0054.py Fri Sep 09 23:54:33 2016 +0200 +++ b/src/plugins/plugin_xep_0054.py Fri Sep 09 23:54:33 2016 +0200 @@ -109,10 +109,10 @@ return True - def isInRoom(self, client, entity_jid): - """Tell if an full jid is a member of a room + def isRoom(self, client, entity_jid): + """Tell if a jid is a MUC one - @param entity_jid(jid.JID): full jid of the entity + @param entity_jid(jid.JID): full or bare jid of the entity check @return (bool): True if the bare jid of the entity is a room jid """ try: @@ -154,7 +154,7 @@ @param value(unicode): new value of the item """ if jid_.resource: - if not self.isInRoom(client, jid_): + if not self.isRoom(client, jid_): # VCard are retrieved with bare jid # but MUC room is a special case jid_ = jid.userhostJID() @@ -172,7 +172,7 @@ @param name: name of the value ('nick' or 'avatar') @return: wanted value or None""" if entity_jid.resource: - if not self.isInRoom(client, entity_jid): + if not self.isRoom(client, entity_jid): # VCard are retrieved with bare jid # but MUC room is a special case entity_jid = jid.userhostJID() @@ -377,7 +377,7 @@ @param presend(domish.Element): stanza """ from_jid = jid.JID(presence['from']) - if from_jid.resource and not self.plugin_parent.isInRoom(self.parent, from_jid): + if from_jid.resource and not self.plugin_parent.isRoom(self.parent, from_jid): from_jid = from_jid.userhostJID() #FIXME: wokkel's data_form should be used here try: