- if (videoChannel.isOwned() && created === true) {
- // Don't resend the activity to the sender
- const exceptions = [ accountAnnouncer ]
- await forwardActivity(activity, t, exceptions)
- }
-
- return undefined
- })
-}
-
-function processVideoShare (accountAnnouncer: AccountInstance, activity: ActivityAnnounce) {
- const options = {
- arguments: [ accountAnnouncer, activity ],
- errorMessage: 'Cannot share the video with many retries.'
+ if (typeof announced === 'string') {
+ const res = await getOrCreateAccountAndVideoAndChannel(announced)
+ video = res.video
+ } else {
+ video = await processCreateActivity(announced)