Changeset 2700925


Ignore:
Timestamp:
2015-05-25T16:07:49Z (9 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Children:
eb89823
Parents:
f16c64d
Message:

Dead code that I might revisit: Status fetching. Yowsup is not feeding back
the result so for now this is not useful. :-(

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/wa.py

    rf16c64d r2700925  
    5555logger.addHandler(ch)
    5656
     57
     58# Tried this but yowsup is not passing back the result, will have to update the library. :-(
     59class 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
    5775class BitlBeeLayer(YowInterfaceLayer):
    5876
     
    178196                                      ", ".join(entity.invalidNumbers.keys()))
    179197
     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                       
    180203                self.check_connected("contacts")
    181204
Note: See TracChangeset for help on using the changeset viewer.