mumble-ruby icon indicating copy to clipboard operation
mumble-ruby copied to clipboard

channel_id is nil for users in root channel

Open Piratonym opened this issue 8 years ago • 0 comments

Introduction

After connecting to a server, the server sends a number of UserStates to the client containing e.g. user names, user IDs and the ID of the channel the user is in. For a full description see: https://mumble-protocol.readthedocs.io/en/latest/establishing_connection.html#user-states

Problem

For users in the root channel, the channel_id field in the UserState is not set by the official Murmur server when transmitting initial user states (see Server::msgAuthenticate). This causes the channel_id attribute in the User object created by mumble-ruby to be nil.

Various unanticipated and hard-to-debug problems can arise from this for gem users, e.g. when trying to join the same channel as a user that has been in the root channel since the client connected.

Possible solutions

mumble-ruby should make sure that every User instance is initialized with a valid channel_id, setting it to 0 if the UserState did not contain any. This could either be implemented in Mumble::User::initialize() or in the on_user_state block in Mumble::Client::init_callbacks().

Piratonym avatar Aug 21 '16 19:08 Piratonym