Update so that any edited streams without a date/time change still get the tag if needed.

This commit is contained in:
Dan Peterson 2021-12-29 10:57:54 -06:00 committed by Thomas Zarebczan
parent 356c5bf30f
commit 33cce4bbcd

View file

@ -150,11 +150,6 @@ function resolvePublishPayload(publishData, myClaimForUri, myChannels, preview)
const nowTimeStamp = Number(Math.round(Date.now() / 1000));
// Add internal tag if a livestream is being scheduled.
if (isLivestreamPublish && releaseTimeEdited && releaseTimeEdited > nowTimeStamp) {
publishPayload.tags.push(SCHEDULED_LIVESTREAM_TAG);
}
// Set release time to current date. On edits, keep original release/transaction time as release_time
if (releaseTimeEdited) {
publishPayload.release_time = releaseTimeEdited;
@ -166,6 +161,11 @@ function resolvePublishPayload(publishData, myClaimForUri, myChannels, preview)
publishPayload.release_time = nowTimeStamp;
}
// Add internal tag if a livestream is being scheduled.
if (isLivestreamPublish && publishPayload.release_time > nowTimeStamp) {
publishPayload.tags.push(SCHEDULED_LIVESTREAM_TAG);
}
if (channelId) {
publishPayload.channel_id = channelId;
}