Calculate presence information with delta between server timestamp

(imported from commit b4b367ed620878e6d01287cb1aaae0730c7475c8)
This commit is contained in:
Leo Franchi
2013-05-06 11:14:59 -04:00
parent d664c2c92c
commit 0da2f51ddb
4 changed files with 12 additions and 10 deletions

View File

@@ -599,6 +599,7 @@ def process_user_activity_event(event):
def send_presence_changed(user_profile, presence):
presence_dict = presence.to_dict()
notice = dict(event=dict(type="presence", email=user_profile.email,
server_timestamp=time.time(),
presence={presence_dict['client']: presence.to_dict()}),
users=[up.id for up in
UserProfile.objects.select_related()