Allow call events to be logged without a room id (#2937)

Prior to this PR, we assumed that all call events needed a room_id, but
we now have call-based actions that don't need a room_id - for instance,
you can right click a channel and view the notes while not in a call. In
this case, there is no room_id. We want to be able to track these
events, which requires removing the restriction that requires a room_id.

Release Notes:

- N/A
This commit is contained in:
Joseph T. Lyons 2023-09-06 23:08:36 -04:00
parent d88dd417bc
commit 3b173b6090
4 changed files with 36 additions and 22 deletions

View file

@ -49,7 +49,7 @@ pub fn toggle_screen_sharing(_: &ToggleScreenSharing, cx: &mut AppContext) {
if room.is_screen_sharing() {
ActiveCall::report_call_event_for_room(
"disable screen share",
room.id(),
Some(room.id()),
room.channel_id(),
&client,
cx,
@ -58,7 +58,7 @@ pub fn toggle_screen_sharing(_: &ToggleScreenSharing, cx: &mut AppContext) {
} else {
ActiveCall::report_call_event_for_room(
"enable screen share",
room.id(),
Some(room.id()),
room.channel_id(),
&client,
cx,
@ -78,7 +78,7 @@ pub fn toggle_mute(_: &ToggleMute, cx: &mut AppContext) {
if room.is_muted(cx) {
ActiveCall::report_call_event_for_room(
"enable microphone",
room.id(),
Some(room.id()),
room.channel_id(),
&client,
cx,
@ -86,7 +86,7 @@ pub fn toggle_mute(_: &ToggleMute, cx: &mut AppContext) {
} else {
ActiveCall::report_call_event_for_room(
"disable microphone",
room.id(),
Some(room.id()),
room.channel_id(),
&client,
cx,