From f3f185435916165a6dd72f3a1bd67e370a2a783d Mon Sep 17 00:00:00 2001 From: tobi Date: Sun, 4 May 2025 09:45:10 +0000 Subject: [bugfix] Fix no notification if mention edited into status (#4102) This pull request adds mention notifications if a mention was edited into a status after its initial publication. Closes https://codeberg.org/superseriousbusiness/gotosocial/issues/3869 Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4102 Co-authored-by: tobi Co-committed-by: tobi --- internal/cache/db.go | 6 ++++++ internal/cache/size.go | 4 +--- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'internal/cache') diff --git a/internal/cache/db.go b/internal/cache/db.go index 31e78f0a5..ac16e26c5 100644 --- a/internal/cache/db.go +++ b/internal/cache/db.go @@ -1083,6 +1083,12 @@ func (c *Caches) initMention() { m2.OriginAccount = nil m2.TargetAccount = nil + // Zero non-db fields. + m2.NameString = "" + m2.IsNew = false + m2.TargetAccountURI = "" + m2.TargetAccountURL = "" + return m2 } diff --git a/internal/cache/size.go b/internal/cache/size.go index 2d9acc7ba..b08a62a85 100644 --- a/internal/cache/size.go +++ b/internal/cache/size.go @@ -549,9 +549,7 @@ func sizeofMention() uintptr { OriginAccountID: exampleURI, OriginAccountURI: exampleURI, TargetAccountID: exampleID, - NameString: exampleUsername, - TargetAccountURI: exampleURI, - TargetAccountURL: exampleURI, + Silent: util.Ptr(false), })) } -- cgit v1.2.3