Build presence update for missed events properly

(imported from commit 15d75a2e0f5c5e1035b526df3aca443a2cffdf25)
This commit is contained in:
Leo Franchi
2013-04-16 09:32:46 -04:00
parent 191fb3cb49
commit c024653331

View File

@@ -839,7 +839,7 @@ def do_events_register(user_profile, apply_markdown=True, event_types=None):
ret['subscriptions'] = filter(lambda s: s['name'] != sub['name'],
ret['subscriptions'])
elif event['type'] == "presence":
ret['presences'][event['email']][event['presence']['client']] = event['presence']
ret['presences'][event['email']] = event['presence']
if events:
ret['last_event_id'] = events[-1]['id']