Changeset 2700925 for python/wa.py
- Timestamp:
- 2015-05-25T16:07:49Z (9 years ago)
- Children:
- eb89823
- Parents:
- f16c64d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/wa.py
rf16c64d r2700925 55 55 logger.addHandler(ch) 56 56 57 58 # Tried this but yowsup is not passing back the result, will have to update the library. :-( 59 class GetStatusIqProtocolEntity(IqProtocolEntity): 60 def __init__(self, jids=None): 61 super(GetStatusIqProtocolEntity, self).__init__("status", None, _type="get", to="s.whatsapp.net") 62 self.jids = jids or [] 63 64 def toProtocolTreeNode(self): 65 from yowsup.structs import ProtocolTreeNode 66 67 node = super(GetStatusIqProtocolEntity, self).toProtocolTreeNode() 68 sr = ProtocolTreeNode("status") 69 node.addChild(sr) 70 for jid in self.jids: 71 sr.addChild(ProtocolTreeNode("user", {"jid": jid})) 72 return node 73 74 57 75 class BitlBeeLayer(YowInterfaceLayer): 58 76 … … 178 196 ", ".join(entity.invalidNumbers.keys())) 179 197 198 # Disabled since yowsup won't give us the result... 199 if entity.inNumbers and False: 200 self.toLower(GetStatusIqProtocolEntity(entity.inNumbers.values())) 201 self.todo.add("statuses") 202 180 203 self.check_connected("contacts") 181 204
Note: See TracChangeset
for help on using the changeset viewer.