~whereswaldon/sprig

c852c94ed613f3c85024ce82e74269b185996c1a — Chris Waldon 5 days ago d96a76c
bugfix: do not notify for conversations created by local user
1 files changed, 4 insertions(+), 4 deletions(-)

M notifications.go
M notifications.go => notifications.go +4 -4
@@ 33,10 33,6 @@ func (n *NotificationManager) ShouldNotify(reply *forest.Reply) bool {
		// do not send old notifications
		return false
	}
	if reply.TreeDepth() == 1 {
		// Notify of new conversation
		return true
	}
	if n.AppState.Settings.ActiveIdentity == nil {
		return false
	}


@@ 45,6 41,10 @@ func (n *NotificationManager) ShouldNotify(reply *forest.Reply) bool {
		// user's identity.
		return false
	}
	if reply.TreeDepth() == 1 {
		// Notify of new conversation
		return true
	}
	parent, known, err := n.AppState.ArborState.SubscribableStore.Get(reply.ParentID())
	if err != nil || !known {
		// Don't notify if we don't know about this conversation.