return '/videos/watch/' + video.uuid
}
- private buildAccountUrl (account: { name: string }) {
- return '/accounts/' + account.name
+ private buildAccountUrl (account: { name: string, host: string }) {
+ return '/accounts/' + Actor.CREATE_BY_STRING(account.name, account.host)
}
private buildVideoImportUrl () {
import { ActorModel } from '../activitypub/actor'
import { ActorFollowModel } from '../activitypub/actor-follow'
import { AvatarModel } from '../avatar/avatar'
+import { ServerModel } from '../server/server'
enum ScopeNames {
WITH_ALL = 'WITH_ALL'
attributes: [ 'filename' ],
model: () => AvatarModel.unscoped(),
required: false
+ },
+ {
+ attributes: [ 'host' ],
+ model: () => ServerModel.unscoped(),
+ required: false
}
]
}
attributes: [ 'filename' ],
model: () => AvatarModel.unscoped(),
required: false
+ },
+ {
+ attributes: [ 'host' ],
+ model: () => ServerModel.unscoped(),
+ required: false
}
]
},
id: this.ActorFollow.ActorFollower.Account.id,
displayName: this.ActorFollow.ActorFollower.Account.getDisplayName(),
name: this.ActorFollow.ActorFollower.preferredUsername,
- avatar: this.ActorFollow.ActorFollower.Avatar ? { path: this.ActorFollow.ActorFollower.Avatar.getWebserverPath() } : undefined
+ avatar: this.ActorFollow.ActorFollower.Avatar ? { path: this.ActorFollow.ActorFollower.Avatar.getWebserverPath() } : undefined,
+ host: this.ActorFollow.ActorFollower.getHost()
},
following: {
type: this.ActorFollow.ActorFollowing.VideoChannel ? 'channel' as 'channel' : 'account' as 'account',
id: accountOrChannel.id,
displayName: accountOrChannel.getDisplayName(),
name: accountOrChannel.Actor.preferredUsername,
+ host: accountOrChannel.Actor.getHost(),
avatar
}
}
function checkActor (actor: any) {
expect(actor.displayName).to.be.a('string')
expect(actor.displayName).to.not.be.empty
+ expect(actor.host).to.not.be.undefined
}
function checkComment (comment: any, commentId: number, threadId: number) {