Delegate the sending of call notifications to Element Call (#30507)
* Move Element Call event types to a more appropriate file To remove the potential for import cycles in src/models/Call.ts, which I was accidentally creating when I tried to reference data from the RoomListStore in the ElementCall class. * Make sure ElementCall tests clean up the call object * Upgrade Element Call to v0.14.1 * Delegate the sending of call notifications to Element Call As of Element Call version 0.14.0, the widget is now capable of sending call notifications itself if we just request this with the sendNotificationType URL parameter. This makes Element Web's group call code a little bit more succinct. * Fix createRoom test
This commit is contained in:
@@ -36,9 +36,9 @@ import { RoomSettingsTab } from "./components/views/dialogs/RoomSettingsDialog";
|
||||
import AccessibleButton from "./components/views/elements/AccessibleButton";
|
||||
import RightPanelStore from "./stores/right-panel/RightPanelStore";
|
||||
import { highlightEvent, isLocationEvent } from "./utils/EventUtils";
|
||||
import { ElementCall } from "./models/Call";
|
||||
import { getSenderName } from "./utils/event/getSenderName";
|
||||
import PosthogTrackers from "./PosthogTrackers.ts";
|
||||
import { ElementCallEventType } from "./call-types.ts";
|
||||
|
||||
function getRoomMemberDisplayname(client: MatrixClient, event: MatrixEvent, userId = event.getSender()): string {
|
||||
const roomId = event.getRoomId();
|
||||
@@ -922,7 +922,7 @@ for (const evType of ALL_RULE_TYPES) {
|
||||
}
|
||||
|
||||
// Add both stable and unstable m.call events
|
||||
for (const evType of ElementCall.CALL_EVENT_TYPE.names) {
|
||||
for (const evType of ElementCallEventType.names) {
|
||||
stateHandlers[evType] = textForCallEvent;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user