aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-11-23 14:37:00 +0100
committerChocobozzz <florian.bigard@gmail.com>2017-11-27 19:40:53 +0100
commitd8553faa4939889fa7b7ef7329aa474a81cbbdb9 (patch)
tree4ccd71690f26b50751fa75d9b9c77d2f790c9bcd /server/lib
parent0032ebe94aa83fab761c7de3ceb6210ac4532824 (diff)
downloadPeerTube-d8553faa4939889fa7b7ef7329aa474a81cbbdb9.tar.gz
PeerTube-d8553faa4939889fa7b7ef7329aa474a81cbbdb9.tar.zst
PeerTube-d8553faa4939889fa7b7ef7329aa474a81cbbdb9.zip
Better follows tests
Diffstat (limited to 'server/lib')
-rw-r--r--server/lib/activitypub/process/process-undo.ts8
-rw-r--r--server/lib/activitypub/send/send-undo.ts9
2 files changed, 8 insertions, 9 deletions
diff --git a/server/lib/activitypub/process/process-undo.ts b/server/lib/activitypub/process/process-undo.ts
index caa835714..9fe066c01 100644
--- a/server/lib/activitypub/process/process-undo.ts
+++ b/server/lib/activitypub/process/process-undo.ts
@@ -1,10 +1,10 @@
1import { ActivityCreate, ActivityFollow, ActivityLike, ActivityUndo } from '../../../../shared/models/activitypub/activity' 1import { ActivityFollow, ActivityLike, ActivityUndo } from '../../../../shared/models/activitypub/activity'
2import { DislikeObject } from '../../../../shared/models/activitypub/objects/dislike-object'
3import { retryTransactionWrapper } from '../../../helpers/database-utils'
2import { logger } from '../../../helpers/logger' 4import { logger } from '../../../helpers/logger'
3import { database as db } from '../../../initializers' 5import { database as db } from '../../../initializers'
4import { retryTransactionWrapper } from '../../../helpers/database-utils'
5import { DislikeObject } from '../../../../shared/models/activitypub/objects/dislike-object'
6import { sendUndoLikeToVideoFollowers } from '../send/send-undo'
7import { sendUndoDislikeToVideoFollowers } from '../index' 6import { sendUndoDislikeToVideoFollowers } from '../index'
7import { sendUndoLikeToVideoFollowers } from '../send/send-undo'
8 8
9async function processUndoActivity (activity: ActivityUndo) { 9async function processUndoActivity (activity: ActivityUndo) {
10 const activityToUndo = activity.object 10 const activityToUndo = activity.object
diff --git a/server/lib/activitypub/send/send-undo.ts b/server/lib/activitypub/send/send-undo.ts
index 53fddd0cb..8f46a051e 100644
--- a/server/lib/activitypub/send/send-undo.ts
+++ b/server/lib/activitypub/send/send-undo.ts
@@ -1,14 +1,14 @@
1import { Transaction } from 'sequelize' 1import { Transaction } from 'sequelize'
2import { ActivityCreate, ActivityFollow, ActivityLike, ActivityUndo } from '../../../../shared/models/activitypub/activity' 2import { ActivityCreate, ActivityFollow, ActivityLike, ActivityUndo } from '../../../../shared/models/activitypub/activity'
3import { getServerAccount } from '../../../helpers/utils'
3import { AccountInstance } from '../../../models' 4import { AccountInstance } from '../../../models'
4import { AccountFollowInstance } from '../../../models/account/account-follow-interface' 5import { AccountFollowInstance } from '../../../models/account/account-follow-interface'
6import { VideoInstance } from '../../../models/video/video-interface'
7import { getAccountFollowActivityPubUrl, getUndoActivityPubUrl, getVideoDislikeActivityPubUrl, getVideoLikeActivityPubUrl } from '../url'
5import { broadcastToFollowers, getAccountsToForwardVideoAction, unicastTo } from './misc' 8import { broadcastToFollowers, getAccountsToForwardVideoAction, unicastTo } from './misc'
9import { createActivityData, createDislikeActivityData } from './send-create'
6import { followActivityData } from './send-follow' 10import { followActivityData } from './send-follow'
7import { getAccountFollowActivityPubUrl, getUndoActivityPubUrl, getVideoDislikeActivityPubUrl, getVideoLikeActivityPubUrl } from '../url'
8import { VideoInstance } from '../../../models/video/video-interface'
9import { likeActivityData } from './send-like' 11import { likeActivityData } from './send-like'
10import { createActivityData, createDislikeActivityData } from './send-create'
11import { getServerAccount } from '../../../helpers/utils'
12 12
13async function sendUndoFollow (accountFollow: AccountFollowInstance, t: Transaction) { 13async function sendUndoFollow (accountFollow: AccountFollowInstance, t: Transaction) {
14 const me = accountFollow.AccountFollower 14 const me = accountFollow.AccountFollower
@@ -75,7 +75,6 @@ async function sendUndoDislikeToVideoFollowers (byAccount: AccountInstance, vide
75 return broadcastToFollowers(data, serverAccount, accountsToForwardView, t, followersException) 75 return broadcastToFollowers(data, serverAccount, accountsToForwardView, t, followersException)
76} 76}
77 77
78
79// --------------------------------------------------------------------------- 78// ---------------------------------------------------------------------------
80 79
81export { 80export {