Skip to content

Commit 1c90e39

Browse files
committed
Set isLive to false if end broadcast is received
1 parent 4dd4155 commit 1c90e39

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

liveactivities/src/main/scala/com/gu/liveactivities/BroadcastLambda.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ object BroadcastLambda extends RequestStreamHandler with Lambda with Logging {
100100
_ <- broadcastApiClient.sendToChannel(mapping.channelId, None, None, broadcastPayload)
101101
_ = logger.info(s"Broadcast ${requestPayload.eventType.asString} sent successfully for match ID $matchId to channel ID ${mapping.channelId}")
102102

103-
_ <- repository.updateMappingLiveAndLastEvent(matchId, isLive = true, Some(eventId), Some(eventTime))
103+
_ <- repository.updateMappingLiveAndLastEvent(matchId, isLive = !shouldEndBroadcast, Some(eventId), Some(eventTime))
104104
_ = logger.info(s"Record updated successfully for match ID $matchId")
105105
} yield mapping.channelId
106106

0 commit comments

Comments
 (0)