aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/activitypub
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-08-17 15:45:42 +0200
committerChocobozzz <me@florianbigard.com>2018-08-27 09:41:54 +0200
commit8a19bee1a1ee39f973bb37429e4f73c3f2873cdb (patch)
tree33c93ef19451d7e46d4be74ce0681359d2dcc70e /server/models/activitypub
parent965c4b22d0e4d2f853501e844e6ebbb861bd389d (diff)
downloadPeerTube-8a19bee1a1ee39f973bb37429e4f73c3f2873cdb.tar.gz
PeerTube-8a19bee1a1ee39f973bb37429e4f73c3f2873cdb.tar.zst
PeerTube-8a19bee1a1ee39f973bb37429e4f73c3f2873cdb.zip
Add ability to set a name to a channel
Diffstat (limited to 'server/models/activitypub')
-rw-r--r--server/models/activitypub/actor.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/server/models/activitypub/actor.ts b/server/models/activitypub/actor.ts
index 35d7c35e8..2abf40713 100644
--- a/server/models/activitypub/actor.ts
+++ b/server/models/activitypub/actor.ts
@@ -260,12 +260,13 @@ export class ActorModel extends Model<ActorModel> {
260 return ActorModel.scope(ScopeNames.FULL).findAll(query) 260 return ActorModel.scope(ScopeNames.FULL).findAll(query)
261 } 261 }
262 262
263 static loadLocalByName (preferredUsername: string) { 263 static loadLocalByName (preferredUsername: string, transaction?: Sequelize.Transaction) {
264 const query = { 264 const query = {
265 where: { 265 where: {
266 preferredUsername, 266 preferredUsername,
267 serverId: null 267 serverId: null
268 } 268 },
269 transaction
269 } 270 }
270 271
271 return ActorModel.scope(ScopeNames.FULL).findOne(query) 272 return ActorModel.scope(ScopeNames.FULL).findOne(query)