See #80
Now that get_publisher is optimized and cost is O(1) , prefer using it instead of iterating over publishers in the room to send the blocked/unblocked event to the blocked user.
Well this may not be a big optimization, this is more for code readability and also to avoid having something like
for room in &joined.room_ids {
notify_user(&event, &whom, switchboard.publishers_occupying(&room));
}
See #80 Now that get_publisher is optimized and cost is O(1) , prefer using it instead of iterating over publishers in the room to send the blocked/unblocked event to the blocked user. Well this may not be a big optimization, this is more for code readability and also to avoid having something like
if a publisher is in several rooms, see https://github.com/mozilla/janus-plugin-sfu/issues/55#issuecomment-778065876 for context.
I tested it with the naf-adapter-janus example, the messages are still sent: