+async function processCreateWatchAction (activity: ActivityCreate) {
+ const watchAction = activity.object as WatchActionObject
+
+ if (watchAction.actionStatus !== 'CompletedActionStatus') return
+
+ const video = await VideoModel.loadByUrl(watchAction.object)
+ if (video.remote) return
+
+ await sequelizeTypescript.transaction(async t => {
+ return createOrUpdateLocalVideoViewer(watchAction, video, t)
+ })
+}
+
+async function processCreateVideoComment (activity: ActivityCreate, byActor: MActorSignature, notify: boolean) {