Fixed typo, improved formatting. Thanks to @JarbasAI!

This commit is contained in:
Mads Marquart
2017-06-29 20:04:01 +02:00
parent c6bac17d48
commit d7139701f7

View File

@@ -1391,12 +1391,11 @@ class Client(object):
# Chat timestamp # Chat timestamp
elif mtype == "chatproxy-presence": elif mtype == "chatproxy-presence":
buddyList = [] buddylist = {}
for id in m.get("buddyList", {}).keys(): for _id in m.get('buddyList', {}):
payload = m["buddyList"][id] payload = m['buddyList'][_id]
timestamp = payload["lat"] buddylist[_id] = payload.get('lat')
buddyList.append({id:timestamp}) self.onChatTimestamp(buddylist=buddylist, msg=m)
self.onChatTimestamp(buddylist=buddyList, msg=m)
# Unknown message type # Unknown message type
else: else:
@@ -1685,7 +1684,7 @@ class Client(object):
""" """
pass pass
def onChatTimestamp(self, buddylist={), msg={}): def onChatTimestamp(self, buddylist={}, msg={}):
""" """
Called when the client receives chat online presence update Called when the client receives chat online presence update