summaryrefslogtreecommitdiff
path: root/internal/cache
diff options
context:
space:
mode:
authorLibravatar tobi <tobi.smethurst@protonmail.com>2025-05-04 09:45:10 +0000
committerLibravatar kim <gruf@noreply.codeberg.org>2025-05-04 09:45:10 +0000
commitf3f185435916165a6dd72f3a1bd67e370a2a783d (patch)
tree766f79d878fbd94cf622944b3cdd8120469ecb55 /internal/cache
parent[chore/cicd] Account for force pushes in conditional runs (#4121) (diff)
downloadgotosocial-f3f185435916165a6dd72f3a1bd67e370a2a783d.tar.xz
[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 <tobi.smethurst@protonmail.com> Co-committed-by: tobi <tobi.smethurst@protonmail.com>
Diffstat (limited to 'internal/cache')
-rw-r--r--internal/cache/db.go6
-rw-r--r--internal/cache/size.go4
2 files changed, 7 insertions, 3 deletions
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),
}))
}