Dont update ended events

This commit is contained in:
2023-07-13 19:55:27 +01:00
parent 29837e2ef6
commit 61a3df1cf8

View File

@ -108,6 +108,8 @@ public class StreamManager
if (user == default) throw new Exception("No stream key found");
var existingEvent = user.GetNostrEvent();
if (existingEvent?.Tags != default && (existingEvent.Tags.FindFirstTagValue("status")?.Equals("ended") ?? false)) return;
var oldViewers = existingEvent?.Tags?.FindFirstTagValue("current_participants");
if (string.IsNullOrEmpty(oldViewers) || int.Parse(oldViewers) != viewers)
{