Merge pull request #1128 from metamaps/feature/prevent.notif.fork
dont send notification for each topic of forked map
This commit is contained in:
commit
f26c6cf0b7
1 changed files with 3 additions and 0 deletions
|
@ -38,6 +38,9 @@ class NotificationService
|
|||
when TOPIC_ADDED_TO_MAP
|
||||
next unless TopicPolicy.new(follow.user, entity).show? && MapPolicy.new(follow.user, event.map).show?
|
||||
next if follow.user.has_map_open(event.map)
|
||||
# note, the caveat to this fork related code is that no future updates will be sent
|
||||
# either. only the notifications for the initial fork should be squashed like this
|
||||
next if event.map.source_id # if map is a fork, send notification for that instead
|
||||
when TOPIC_CONNECTED_1, TOPIC_CONNECTED_2
|
||||
next unless SynapsePolicy.new(follow.user, event).show?
|
||||
next if follow.user.has_map_with_synapse_open(event)
|
||||
|
|
Loading…
Reference in a new issue