This commit is contained in:
parent
3016a75332
commit
88ca5a1362
|
@ -42,7 +42,12 @@ from resolvers.topic import (
|
|||
get_topics_by_community,
|
||||
)
|
||||
|
||||
|
||||
from resolvers.notifier import (
|
||||
load_notifications,
|
||||
notification_mark_seen,
|
||||
notifications_seen_after,
|
||||
notifications_seen_thread
|
||||
)
|
||||
|
||||
__all__ = [
|
||||
# author
|
||||
|
@ -88,4 +93,10 @@ __all__ = [
|
|||
'update_reaction',
|
||||
'delete_reaction',
|
||||
'load_reactions_by',
|
||||
|
||||
# notifier
|
||||
'load_notifications',
|
||||
'notifications_seen_thread',
|
||||
'notifications_seen_after',
|
||||
'notification_mark_seen'
|
||||
]
|
||||
|
|
|
@ -167,7 +167,7 @@ def get_notifications_grouped(author_id: int, after: int = 0, limit: int = 10):
|
|||
existing_group['reactions'].append(payload)
|
||||
groups_by_thread[thread_id] = existing_group
|
||||
else:
|
||||
group = group_reaction(payload, seen, notification.action)
|
||||
group = group_reaction(payload, seen, notification.action) # NOTE: last action will be group-wise
|
||||
if group:
|
||||
groups_by_thread[thread_id] = group
|
||||
groups_amount += 1
|
||||
|
|
|
@ -43,5 +43,5 @@ type Query {
|
|||
get_topics_by_community(slug: String, community_id: Int): [Topic]
|
||||
|
||||
# notifier
|
||||
get_notifications: NotificationsResult!
|
||||
load_notifications(after: Int!, limit: Int): NotificationsResult!
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user