Revert "Convert telemetry into a model"

This reverts commit 6e4268a471.
This commit is contained in:
Joseph T. Lyons 2023-11-22 16:16:44 -05:00
parent c86e99928b
commit ee2b6834bd
9 changed files with 199 additions and 208 deletions

View file

@ -482,26 +482,27 @@ pub fn report_call_event_for_room(
let telemetry = client.telemetry();
let telemetry_settings = *TelemetrySettings::get_global(cx);
telemetry.update(cx, |this, cx| {
this.report_call_event(telemetry_settings, operation, Some(room_id), channel_id, cx)
});
telemetry.report_call_event(telemetry_settings, operation, Some(room_id), channel_id)
}
pub fn report_call_event_for_channel(
operation: &'static str,
channel_id: u64,
client: &Arc<Client>,
cx: &mut AppContext,
cx: &AppContext,
) {
let room = ActiveCall::global(cx).read(cx).room();
let room_id = room.map(|r| r.read(cx).id());
let telemetry = client.telemetry();
let telemetry_settings = *TelemetrySettings::get_global(cx);
telemetry.update(cx, |this, cx| {
this.report_call_event(telemetry_settings, operation, room_id, Some(channel_id), cx)
});
telemetry.report_call_event(
telemetry_settings,
operation,
room.map(|r| r.read(cx).id()),
Some(channel_id),
)
}
#[cfg(test)]