diff options
author | Chocobozzz <me@florianbigard.com> | 2019-08-02 09:46:48 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-08-02 09:46:48 +0200 |
commit | 44b88f180bc9ec692885e7db08757a43b3e2df79 (patch) | |
tree | 906cdbf6d229a1e57e07d24568d4f0365587ee31 /server/models/account/account.ts | |
parent | 075942b212ff02aebf2f6668322407d40a0b91e5 (diff) | |
download | PeerTube-44b88f180bc9ec692885e7db08757a43b3e2df79.tar.gz PeerTube-44b88f180bc9ec692885e7db08757a43b3e2df79.tar.zst PeerTube-44b88f180bc9ec692885e7db08757a43b3e2df79.zip |
Fix broken follow notification
Diffstat (limited to 'server/models/account/account.ts')
-rw-r--r-- | server/models/account/account.ts | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/server/models/account/account.ts b/server/models/account/account.ts index 28014946f..4dc412301 100644 --- a/server/models/account/account.ts +++ b/server/models/account/account.ts | |||
@@ -30,6 +30,7 @@ import { CONSTRAINTS_FIELDS, WEBSERVER } from '../../initializers/constants' | |||
30 | import { FindOptions, IncludeOptions, Op, Transaction, WhereOptions } from 'sequelize' | 30 | import { FindOptions, IncludeOptions, Op, Transaction, WhereOptions } from 'sequelize' |
31 | import { AccountBlocklistModel } from './account-blocklist' | 31 | import { AccountBlocklistModel } from './account-blocklist' |
32 | import { ServerBlocklistModel } from '../server/server-blocklist' | 32 | import { ServerBlocklistModel } from '../server/server-blocklist' |
33 | import { ActorFollowModel } from '../activitypub/actor-follow' | ||
33 | 34 | ||
34 | export enum ScopeNames { | 35 | export enum ScopeNames { |
35 | SUMMARY = 'SUMMARY' | 36 | SUMMARY = 'SUMMARY' |
@@ -220,6 +221,7 @@ export class AccountModel extends Model<AccountModel> { | |||
220 | instance.Actor = await instance.$get('Actor', { transaction: options.transaction }) as ActorModel | 221 | instance.Actor = await instance.$get('Actor', { transaction: options.transaction }) as ActorModel |
221 | } | 222 | } |
222 | 223 | ||
224 | await ActorFollowModel.removeFollowsOf(instance.Actor.id, options.transaction) | ||
223 | if (instance.isOwned()) { | 225 | if (instance.isOwned()) { |
224 | return sendDeleteActor(instance.Actor, options.transaction) | 226 | return sendDeleteActor(instance.Actor, options.transaction) |
225 | } | 227 | } |