From 8480a758081e84384a366a29ecee3c3103687512 Mon Sep 17 00:00:00 2001 From: tobi Date: Sun, 11 May 2025 13:38:13 +0000 Subject: [feature] Notify accounts when a status they've interacted with has been edited (#4157) This pull request adds sending notifications to local accounts that have interacted with a status, if we receive or create a new edit for that status. closes https://codeberg.org/superseriousbusiness/gotosocial/issues/3991 Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4157 Co-authored-by: tobi Co-committed-by: tobi --- internal/processing/workers/fromfediapi_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'internal/processing/workers/fromfediapi_test.go') diff --git a/internal/processing/workers/fromfediapi_test.go b/internal/processing/workers/fromfediapi_test.go index 203863e12..d197f4122 100644 --- a/internal/processing/workers/fromfediapi_test.go +++ b/internal/processing/workers/fromfediapi_test.go @@ -102,7 +102,7 @@ func (suite *FromFediAPITestSuite) TestProcessFederationAnnounce() { suite.Equal(gtsmodel.NotificationReblog, notif.NotificationType) suite.Equal(boostedStatus.AccountID, notif.TargetAccountID) suite.Equal(announceStatus.AccountID, notif.OriginAccountID) - suite.Equal(announceStatus.ID, notif.StatusID) + suite.Equal(announceStatus.ID, notif.StatusOrEditID) suite.False(*notif.Read) } @@ -173,7 +173,7 @@ func (suite *FromFediAPITestSuite) TestProcessReplyMention() { suite.Equal(gtsmodel.NotificationMention, notif.NotificationType) suite.Equal(replyingStatus.InReplyToAccountID, notif.TargetAccountID) suite.Equal(replyingStatus.AccountID, notif.OriginAccountID) - suite.Equal(replyingStatus.ID, notif.StatusID) + suite.Equal(replyingStatus.ID, notif.StatusOrEditID) suite.False(*notif.Read) ctx, _ := context.WithTimeout(context.Background(), time.Second*5) @@ -245,7 +245,7 @@ func (suite *FromFediAPITestSuite) TestProcessFave() { suite.Equal(gtsmodel.NotificationFavourite, notif.NotificationType) suite.Equal(fave.TargetAccountID, notif.TargetAccountID) suite.Equal(fave.AccountID, notif.OriginAccountID) - suite.Equal(fave.StatusID, notif.StatusID) + suite.Equal(fave.StatusID, notif.StatusOrEditID) suite.False(*notif.Read) ctx, _ := context.WithTimeout(context.Background(), time.Second*5) @@ -318,7 +318,7 @@ func (suite *FromFediAPITestSuite) TestProcessFaveWithDifferentReceivingAccount( suite.Equal(gtsmodel.NotificationFavourite, notif.NotificationType) suite.Equal(fave.TargetAccountID, notif.TargetAccountID) suite.Equal(fave.AccountID, notif.OriginAccountID) - suite.Equal(fave.StatusID, notif.StatusID) + suite.Equal(fave.StatusID, notif.StatusOrEditID) suite.False(*notif.Read) // 2. no notification should be streamed to the account that received the fave message, because they weren't the target -- cgit v1.2.3