mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2024-12-23 02:32:12 +00:00
[bugfix] Do not generate a notification when favouriting your own post (#780)
This commit is contained in:
parent
1f8ecf1c15
commit
5d9c6b0e5a
|
@ -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 {
|
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 {
|
if fave.TargetAccount == nil {
|
||||||
a, err := p.db.GetAccountByID(ctx, fave.TargetAccountID)
|
a, err := p.db.GetAccountByID(ctx, fave.TargetAccountID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in a new issue