From b845fe7c5809880f48139a10c064737175505553 Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Wed, 6 Apr 2022 14:37:38 +0100 Subject: [PATCH] Leave room for the user ID we'll no doubt append afterward --- syncapi/notifier/notifier.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/syncapi/notifier/notifier.go b/syncapi/notifier/notifier.go index 4f992d341..44f133388 100644 --- a/syncapi/notifier/notifier.go +++ b/syncapi/notifier/notifier.go @@ -267,7 +267,7 @@ func (n *Notifier) SharedUsers(userID string) []string { n._sharedUsers[userID] = struct{}{} } } - sharedUsers := make([]string, 0, len(n._sharedUsers)) + sharedUsers := make([]string, 0, len(n._sharedUsers)+1) for userID := range n._sharedUsers { sharedUsers = append(sharedUsers, userID) delete(n._sharedUsers, userID)