import { AccountBlocklistModel } from './account-blocklist'
import { ServerBlocklistModel } from '../server/server-blocklist'
import { ActorFollowModel } from '../activitypub/actor-follow'
-import { MAccountActor, MAccountDefault } from '../../typings/models'
+import { MAccountActor, MAccountDefault, MAccountSummaryFormattable, MAccountFormattable, MAccountAP } from '../../typings/models'
import * as Bluebird from 'bluebird'
export enum ScopeNames {
@HasMany(() => VideoCommentModel, {
foreignKey: {
- allowNull: false
+ allowNull: true
},
onDelete: 'cascade',
hooks: true
.findAll(query)
}
- toFormattedJSON (): Account {
+ toFormattedJSON (this: MAccountFormattable): Account {
const actor = this.Actor.toFormattedJSON()
const account = {
id: this.id,
return Object.assign(actor, account)
}
- toFormattedSummaryJSON (): AccountSummary {
- const actor = this.Actor.toFormattedJSON()
+ toFormattedSummaryJSON (this: MAccountSummaryFormattable): AccountSummary {
+ const actor = this.Actor.toFormattedSummaryJSON()
return {
id: this.id,
}
}
- toActivityPubObject () {
- const obj = this.Actor.toActivityPubObject(this.name, 'Account')
+ toActivityPubObject (this: MAccountAP) {
+ const obj = this.Actor.toActivityPubObject(this.name)
return Object.assign(obj, {
summary: this.description