+ return Promise.all([
+ shareByServer(video, t),
+ shareByVideoChannel(video, t)
+ ])
+}
+
+async function changeVideoChannelShare (video: VideoModel, oldVideoChannel: VideoChannelModel, t: Transaction) {
+ await undoShareByVideoChannel(video, oldVideoChannel, t)
+
+ await shareByVideoChannel(video, t)
+}
+
+export {
+ changeVideoChannelShare,
+ shareVideoByServerAndChannel
+}
+
+// ---------------------------------------------------------------------------
+
+async function shareByServer (video: VideoModel, t: Transaction) {