Skip to content

Commit

Permalink
Remove broadcaster user as owner when downgrading tier
Browse files Browse the repository at this point in the history
  • Loading branch information
fitztrev committed Feb 1, 2025
1 parent 25d4d94 commit 11e1719
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions modules/relay/src/main/RelayTour.scala
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ case class RelayTour(
def giveOfficialToBroadcasterIf(cond: Boolean) =
if cond && official && !isOwnedBy(UserId.broadcaster)
then copy(ownerIds = ownerIds.append(UserId.broadcaster))
else if cond && !official && isOwnedBy(UserId.broadcaster)
then
copy(ownerIds = NonEmptyList.fromList(ownerIds.filterNot(_ == UserId.broadcaster)).getOrElse(ownerIds))
else this

def path: String = s"/broadcast/$slug/$id"
Expand Down

0 comments on commit 11e1719

Please sign in to comment.