It seems that on the mobile app, you can only create rooms but cannot directly enter already created rooms by clicking on them. However, if you directly access /resenha/r/topic, it works. Is this a bug?
Works just fine for me on my phone, have you updated your Discourse instance this week?
Experimental plugins require frequent updates
Lots of updates this month, but the main one is optional and per-room support for SFU via LiveKit.
Full P2P WebRTC is still the main and default supported transport, but SFU is now also supported for people who need to support hundreds of participants in a single room.
Weโve also made lots of improvements, like Audio and Video device pickers on room and widget controls, made Resenha rooms mentionable via # auto complete on chat and posts, room layout options, and more.
Thanks for this, the SFU was the real missing piece. Itโs what originally pushed me into maintaining a separate fork; with it supported upstream I can retire the fork and track resenha directly.
Iโd held off asking about LiveKit because I didnโt know if you wanted to go that direction. Now that you have: are you open to PRs for features and small improvements?
@Falco Hey Iโve hit a few reproducible issues while testing the updated resenha. Sharing findings + the patches Iโm running locally, in case theyโre useful upstream.
1. Admin UI silently discards room_type stage rooms can never stick
app/controllers/resenha/admin_rooms_controller.rb:65 (room_params) omits :room_type from the permit list, and admin_room_serializer.rb never serializes it.
Every stage assignment made through the admin UI is dropped, rooms create as open and โrevertโ to open on any later admin edit. Confirmed via production logs; the user-facing controller permits it, only the admin path lost it.
# admin_rooms_controller.rb โ add :room_type to the permit list, then:
if permitted.key?(:room_type)
value = Resenha::Room::ROOM_TYPES[permitted[:room_type].to_s]
raise Discourse::InvalidParameters.new(:room_type) if value.nil?
permitted[:room_type] = value
end
# admin_room_serializer.rb โ serialize room_type so the form initializes correctly
2. Invalid room_type silently falls back to open
app/controllers/resenha/rooms_controller.rb:575 โ ROOM_TYPES[...] || ROOM_TYPE_OPEN.
Any malformed/stale room_type in an otherwise-valid room edit quietly flips a stage room to open. A 400 makes the misbehaving caller visible instead of corrupting the room.
value = Resenha::Room::ROOM_TYPES[permitted[:room_type].to_s]
raise Discourse::InvalidParameters.new(:room_type) if value.nil?
permitted[:room_type] = value
3. Heartbeat resurrects a user who just left (ghost presence)
rooms_controller.rb:234 (heartbeat) unconditionally re-adds presence, so a heartbeat in flight when leave (:220) processes lands second and re-creates the departed user.
The ghost persists until the TTL reap, which doesnโt broadcast โ clients show them โin the roomโ for up to a minute.
Reproduced on device; kick has the identical exposure.
# ParticipantTracker: 15s tombstone
def mark_left(room_id, user_id) = redis.setex(left_key(room_id, user_id), 15, "1")
def recently_left?(room_id, user_id) = redis.exists?(left_key(room_id, user_id))
# leave/kick โ mark_left; join/livekit_token โ clear_left; heartbeat:
return head :no_content if Resenha::ParticipantTracker.recently_left?(@room.id, current_user.id)
4. Stale participant_left webhook phantom-kicks a fresh session
livekit_webhooks_controller.rb:37/57 โ departures are matched by user identity alone.
On a quick disconnect/rejoin, the superseded sessionโs participant_left arrives late and expires the new sessionโs presence (user โkickedโ ~3s after rejoining, back ~15s later).
Reproduced on device; the gone_at heuristic canโt distinguish the sessions when the rejoin predates the old sessionโs disconnect.
# participant_joined โ record the live SID
Resenha::ParticipantTracker.set_livekit_sid(room.id, user_id, event.dig("participant", "sid"))
# expire_participant โ skip a superseded session's departure
known = Resenha::ParticipantTracker.livekit_sid(room.id, user_id)
return if sid.present? && known.present? && sid != known
5. DeleteRoom 404 after the last leave floods the logs
lib/resenha/livekit/room_service_client.rb:84 warns on any non-200.
The SFU auto-closes a room the moment it empties, so the last leaveโs DeleteRoom routinely races it โ โrequested room does not existโ is the desired end state, not a fault.
It lands in Logster on every last-leave.
elsif method == "DeleteRoom" && response.status == 404
Rails.logger.debug("[resenha-livekit] DeleteRoom no-op for room #{room.id}: already gone")
true
I can send a pull request if you wish.
As I said in previous I donโt know your direction in full, but you can have a look at mines as Iโve made a post here โ Discourse Desktop Mac App - #10 by nicolsdennis
This would be absolutely brilliant - it would make sense to make it hook into the Livestream mechanism, which would provide the associated chat channel as part of a beautiful integrated experience
Hi, when changing the name of the room, it doesnโt update the slug. Also, it doesnโt let me delete rooms โ I get server error.
It would also be nice to be able to visually change the order of the rooms and how they appear.