diff options
Diffstat (limited to 'server/models')
-rw-r--r-- | server/models/activitypub/actor.ts | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/server/models/activitypub/actor.ts b/server/models/activitypub/actor.ts index ef8dd9f7c..69c2eca57 100644 --- a/server/models/activitypub/actor.ts +++ b/server/models/activitypub/actor.ts | |||
@@ -266,6 +266,18 @@ export class ActorModel extends Model<ActorModel> { | |||
266 | return ActorModel.unscoped().findById(id) | 266 | return ActorModel.unscoped().findById(id) |
267 | } | 267 | } |
268 | 268 | ||
269 | static isActorUrlExist (url: string) { | ||
270 | const query = { | ||
271 | raw: true, | ||
272 | where: { | ||
273 | url | ||
274 | } | ||
275 | } | ||
276 | |||
277 | return ActorModel.unscoped().findOne(query) | ||
278 | .then(a => !!a) | ||
279 | } | ||
280 | |||
269 | static listByFollowersUrls (followersUrls: string[], transaction?: Sequelize.Transaction) { | 281 | static listByFollowersUrls (followersUrls: string[], transaction?: Sequelize.Transaction) { |
270 | const query = { | 282 | const query = { |
271 | where: { | 283 | where: { |