From 8424c4026afd7304880a4ce8138a04ffb3d8c938 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 30 Aug 2019 16:50:12 +0200 Subject: Add auto follow back support for instances --- server/typings/models/account/actor-follow.ts | 10 +++------- server/typings/models/account/actor.ts | 2 +- server/typings/models/user/user-notification.ts | 11 ++++++----- server/typings/models/video/video-blacklist.ts | 3 +++ 4 files changed, 13 insertions(+), 13 deletions(-) (limited to 'server/typings/models') diff --git a/server/typings/models/account/actor-follow.ts b/server/typings/models/account/actor-follow.ts index 17a47b8df..1c66eb0a0 100644 --- a/server/typings/models/account/actor-follow.ts +++ b/server/typings/models/account/actor-follow.ts @@ -2,7 +2,7 @@ import { ActorFollowModel } from '../../../models/activitypub/actor-follow' import { MActor, MActorAccount, - MActorAccountChannel, + MActorDefaultAccountChannel, MActorChannelAccountActor, MActorDefault, MActorFormattable, @@ -37,8 +37,8 @@ export type MActorFollowActorsDefault = MActorFollow & Use<'ActorFollowing', MActorDefault> export type MActorFollowFull = MActorFollow & - Use<'ActorFollower', MActorAccountChannel> & - Use<'ActorFollowing', MActorAccountChannel> + Use<'ActorFollower', MActorDefaultAccountChannel> & + Use<'ActorFollowing', MActorDefaultAccountChannel> // ############################################################################ @@ -51,10 +51,6 @@ export type MActorFollowActorsDefaultSubscription = MActorFollow & Use<'ActorFollower', MActorDefault> & Use<'ActorFollowing', SubscriptionFollowing> -export type MActorFollowFollowingFullFollowerAccount = MActorFollow & - Use<'ActorFollower', MActorAccount> & - Use<'ActorFollowing', MActorAccountChannel> - export type MActorFollowSubscriptions = MActorFollow & Use<'ActorFollowing', MActorChannelAccountActor> diff --git a/server/typings/models/account/actor.ts b/server/typings/models/account/actor.ts index d4bcac4a3..bcacb8351 100644 --- a/server/typings/models/account/actor.ts +++ b/server/typings/models/account/actor.ts @@ -58,7 +58,7 @@ export type MActorAccount = MActor & export type MActorChannel = MActor & Use<'VideoChannel', MChannel> -export type MActorAccountChannel = MActorAccount & MActorChannel +export type MActorDefaultAccountChannel = MActorDefault & MActorAccount & MActorChannel export type MActorServer = MActor & Use<'Server', MServer> diff --git a/server/typings/models/user/user-notification.ts b/server/typings/models/user/user-notification.ts index f9daf5eb2..1cdc691b0 100644 --- a/server/typings/models/user/user-notification.ts +++ b/server/typings/models/user/user-notification.ts @@ -1,5 +1,5 @@ import { UserNotificationModel } from '../../../models/account/user-notification' -import { PickWith } from '../../utils' +import { PickWith, PickWithOpt } from '../../utils' import { VideoModel } from '../../../models/video/video' import { ActorModel } from '../../../models/activitypub/actor' import { ServerModel } from '../../../models/server/server' @@ -48,12 +48,13 @@ export namespace UserNotificationIncludes { export type ActorFollower = Pick & PickWith & - PickWith> & - PickWith> + PickWith> & + PickWithOpt> - export type ActorFollowing = Pick & + export type ActorFollowing = Pick & PickWith & - PickWith + PickWith & + PickWith> export type ActorFollowInclude = Pick & PickWith & diff --git a/server/typings/models/video/video-blacklist.ts b/server/typings/models/video/video-blacklist.ts index 1dedfa37f..e12880454 100644 --- a/server/typings/models/video/video-blacklist.ts +++ b/server/typings/models/video/video-blacklist.ts @@ -13,6 +13,9 @@ export type MVideoBlacklistUnfederated = Pick // ############################################################################ +export type MVideoBlacklistLightVideo = MVideoBlacklistLight & + Use<'Video', MVideo> + export type MVideoBlacklistVideo = MVideoBlacklist & Use<'Video', MVideo> -- cgit v1.2.3