♻️(backend) pass the participant role in the LiveKit token

The backend previously passed an abstract is_admin_or_owner boolean
flag in the LiveKit token. That kept the frontend minimalistic and
saved it from having to handle role comparisons.

As we introduce more features that need to distinguish between the
room owner and admins, refactor the token to carry the role
directly. The frontend can then derive the relevant flags from a
richer piece of information.
This commit is contained in:
lebaudantoine
2026-07-07 19:21:12 +02:00
parent 13cee8d276
commit 5b23c1f5b2
13 changed files with 143 additions and 67 deletions
+1 -1
View File
@@ -183,7 +183,7 @@ class RoomSerializer(serializers.ModelSerializer):
user=request.user,
username=username,
configuration=output["configuration"],
is_admin_or_owner=is_admin_or_owner,
role=role,
)
else:
del output["pin_code"]