This commit is contained in:
@@ -66,6 +66,7 @@ async def get_notifications_grouped(
|
||||
elif n.action == "create":
|
||||
print(f"[resolvers.schema] create shout: {shout}")
|
||||
notification_group = NotificationGroup(
|
||||
id=thread_id,
|
||||
entity=n.entity,
|
||||
shout=shout,
|
||||
authors=shout.authors,
|
||||
@@ -105,6 +106,7 @@ async def get_notifications_grouped(
|
||||
reactions = []
|
||||
reactions.append(reaction.id)
|
||||
notification_group = NotificationGroup(
|
||||
id=thread_id,
|
||||
action=n.action,
|
||||
entity=n.entity,
|
||||
updated_at=reaction.created_at,
|
||||
@@ -122,6 +124,7 @@ async def get_notifications_grouped(
|
||||
notification_group = notifications.get(thread_id)
|
||||
if not notification_group:
|
||||
notification_group = NotificationGroup(
|
||||
id=thread_id,
|
||||
authors=[follower],
|
||||
updated_at=int(time.time()),
|
||||
shout=None,
|
||||
@@ -129,6 +132,9 @@ async def get_notifications_grouped(
|
||||
entity="follower",
|
||||
action="follow",
|
||||
)
|
||||
else:
|
||||
notification_group.authors = [follower, ]
|
||||
notification_group.updated_at = int(time.time())
|
||||
# store group in result
|
||||
notifications[thread_id] = notification_group
|
||||
counter += 1
|
||||
|
Reference in New Issue
Block a user