diff options
author | John Smith <mrdoctorwho@gmail.com> | 2016-12-25 12:08:59 +0300 |
---|---|---|
committer | John Smith <mrdoctorwho@gmail.com> | 2016-12-25 12:08:59 +0300 |
commit | 80781818123375d3d9f65c7ed82d877e72252733 (patch) | |
tree | b0c2408d95f9e8450989514b9707614ea19241c8 /modules/mod_iq_last.py | |
parent | 441bde97f22f5d1d87a05a60e7364b049f8fcfd1 (diff) |
Refactoring: rename Transport to Users, create error reporter, fix #135
Diffstat (limited to 'modules/mod_iq_last.py')
-rw-r--r-- | modules/mod_iq_last.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/mod_iq_last.py b/modules/mod_iq_last.py index 8b79e94..4120585 100644 --- a/modules/mod_iq_last.py +++ b/modules/mod_iq_last.py @@ -17,10 +17,10 @@ def last_handler(cl, iq): if id == TransportID: last = int(time.time() - startTime) name = IDENTIFIER["name"] - elif source in Transport and id in Transport[source].friends: - last = Transport[source].vk.method("execute.getLastTime", {"uid": id}) or 0 + elif source in Users and id in Users[source].friends: + last = Users[source].vk.method("execute.getLastTime", {"uid": id}) or 0 last = int(time.time() - last) - name = Transport[source].vk.getUserData(id).get("name", "Unknown") + name = Users[source].vk.getUserData(id).get("name", "Unknown") else: raise xmpp.NodeProcessed() result = xmpp.Iq("result", to=jidFrom, frm=destination) |