summaryrefslogtreecommitdiff
path: root/internal/processing/fromcommon.go
diff options
context:
space:
mode:
authorLibravatar Blackle Morisanchetto <isabelle@blackle-mori.com>2022-08-30 05:43:29 -0400
committerLibravatar GitHub <noreply@github.com>2022-08-30 11:43:29 +0200
commit5d9c6b0e5abe6fce77625a863652fe813f180949 (patch)
tree91d5b3f6a7df837e81f539a10ee698c82c8c2f3e /internal/processing/fromcommon.go
parent[bugfix] Fix issue where the 'favourited' field of a notification's status is... (diff)
downloadgotosocial-5d9c6b0e5abe6fce77625a863652fe813f180949.tar.xz
[bugfix] Do not generate a notification when favouriting your own post (#780)
Diffstat (limited to 'internal/processing/fromcommon.go')
-rw-r--r--internal/processing/fromcommon.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/internal/processing/fromcommon.go b/internal/processing/fromcommon.go
index 2cac20193..fca23304c 100644
--- a/internal/processing/fromcommon.go
+++ b/internal/processing/fromcommon.go
@@ -203,6 +203,11 @@ func (p *processor) notifyFollow(ctx context.Context, follow *gtsmodel.Follow, t
}
func (p *processor) notifyFave(ctx context.Context, fave *gtsmodel.StatusFave) error {
+ // ignore self-faves
+ if fave.TargetAccountID == fave.AccountID {
+ return nil
+ }
+
if fave.TargetAccount == nil {
a, err := p.db.GetAccountByID(ctx, fave.TargetAccountID)
if err != nil {