mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-06 03:50:26 +02:00
Stronger model typings
This commit is contained in:
parent
13176a07a9
commit
453e83ea5d
176 changed files with 2118 additions and 1133 deletions
|
@ -4,9 +4,9 @@ import { getActorFollowActivityPubUrl } from '../url'
|
|||
import { unicastTo } from './utils'
|
||||
import { logger } from '../../../helpers/logger'
|
||||
import { Transaction } from 'sequelize'
|
||||
import { ActorModelOnly } from '../../../typings/models'
|
||||
import { MActor, MActorFollowActors } from '../../../typings/models'
|
||||
|
||||
function sendFollow (actorFollow: ActorFollowModel, t: Transaction) {
|
||||
function sendFollow (actorFollow: MActorFollowActors, t: Transaction) {
|
||||
const me = actorFollow.ActorFollower
|
||||
const following = actorFollow.ActorFollowing
|
||||
|
||||
|
@ -21,7 +21,7 @@ function sendFollow (actorFollow: ActorFollowModel, t: Transaction) {
|
|||
t.afterCommit(() => unicastTo(data, me, following.inboxUrl))
|
||||
}
|
||||
|
||||
function buildFollowActivity (url: string, byActor: ActorModelOnly, targetActor: ActorModelOnly): ActivityFollow {
|
||||
function buildFollowActivity (url: string, byActor: MActor, targetActor: MActor): ActivityFollow {
|
||||
return {
|
||||
type: 'Follow',
|
||||
id: url,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue