From efb956d277e2b1369221893b513c9608510fba4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Evren=20Esat=20=C3=96zkan?= Date: Fri, 22 Jul 2016 14:10:59 +0300 Subject: [PATCH] rref #5367 rref #5366 ref zetaops/zengine#66 ref zetaops/zengine#65 --- zengine/messaging/model.py | 2 +- zengine/messaging/views.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/zengine/messaging/model.py b/zengine/messaging/model.py index ee362659..8c89810e 100644 --- a/zengine/messaging/model.py +++ b/zengine/messaging/model.py @@ -176,7 +176,7 @@ class Subscriber(Model): is_visible = field.Boolean("Show under user's channel list", default=True) can_manage = field.Boolean("Can manage this channel", default=False) can_leave = field.Boolean("Membership is not obligatory", default=True) - last_seen_msg_time = field.DateTime("Last seen message's time") + last_seen_msg_time = field.TimeStamp("Last seen message's time") # status = field.Integer("Status", choices=SUBSCRIPTION_STATUS) diff --git a/zengine/messaging/views.py b/zengine/messaging/views.py index d1cebb9d..6834edb7 100644 --- a/zengine/messaging/views.py +++ b/zengine/messaging/views.py @@ -238,7 +238,9 @@ def report_last_seen_message(current): Subscriber(current).objects.filter(channel_id=current.input['channel_key'], user_id=current.user_id ).update(last_seen_msg_time=current.input['timestamp']) - + current.output = { + 'status': 'OK', + 'code': 200} def list_channels(current): """