Uses the "host" property as the creator of the stream.

This commit is contained in:
Vitor Pamplona
2023-09-30 17:43:46 -04:00
parent bac50668e8
commit e454ccc326
3 changed files with 14 additions and 2 deletions
@@ -28,6 +28,8 @@ class LiveActivitiesEvent(
fun participants() = tags.filter { it.size > 1 && it[0] == "p" }.map { Participant(it[1], it.getOrNull(3)) }
fun host() = tags.firstOrNull { it.size > 3 && it[0] == "p" && it[3].equals("Host", true) }?.get(1)
fun checkStatus(eventStatus: String?): String? {
return if (eventStatus == STATUS_LIVE && createdAt < TimeUtils.eightHoursAgo()) {
STATUS_ENDED