mirror of
https://github.com/zulip/zulip.git
synced 2026-07-12 21:04:41 +08:00
Optimize get_updates_longpoll in the same manner as 805a944
(imported from commit 819826d34ef6a0adbf619d4bf5e740c1838c896c)
This commit is contained in:
parent
35dcc04822
commit
911f4306db
@ -69,9 +69,9 @@ class UserProfile(models.Model):
|
||||
def add_callback(self, cb, last_received):
|
||||
global callback_table
|
||||
|
||||
new_zephyrs = [um.message for um in
|
||||
UserMessage.objects.filter(user_profile=self,
|
||||
message__id__gt=last_received)]
|
||||
new_zephyrs = Zephyr.objects.filter(
|
||||
usermessage__user_profile = self,
|
||||
id__gt = last_received)
|
||||
|
||||
if new_zephyrs:
|
||||
return cb(new_zephyrs)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user