Merge pull request #3418 from element-hq/robin/notification-capability
Request capability to send call notifications
This commit is contained in:
@@ -106,6 +106,10 @@ export const widget = ((): WidgetHelpers | null => {
|
|||||||
if (!baseUrl) throw new Error("Base URL must be supplied");
|
if (!baseUrl) throw new Error("Base URL must be supplied");
|
||||||
|
|
||||||
// These are all the event types the app uses
|
// These are all the event types the app uses
|
||||||
|
const sendEvent = [
|
||||||
|
EventType.CallNotify, // Sent as a deprecated fallback
|
||||||
|
EventType.RTCNotification,
|
||||||
|
];
|
||||||
const sendRecvEvent = [
|
const sendRecvEvent = [
|
||||||
"org.matrix.rageshake_request",
|
"org.matrix.rageshake_request",
|
||||||
EventType.CallEncryptionKeysPrefix,
|
EventType.CallEncryptionKeysPrefix,
|
||||||
@@ -129,6 +133,7 @@ export const widget = ((): WidgetHelpers | null => {
|
|||||||
{ eventType: EventType.RoomEncryption },
|
{ eventType: EventType.RoomEncryption },
|
||||||
{ eventType: EventType.GroupCallMemberPrefix },
|
{ eventType: EventType.GroupCallMemberPrefix },
|
||||||
];
|
];
|
||||||
|
|
||||||
const sendRecvToDevice = [
|
const sendRecvToDevice = [
|
||||||
EventType.CallInvite,
|
EventType.CallInvite,
|
||||||
EventType.CallCandidates,
|
EventType.CallCandidates,
|
||||||
@@ -146,7 +151,7 @@ export const widget = ((): WidgetHelpers | null => {
|
|||||||
const client = createRoomWidgetClient(
|
const client = createRoomWidgetClient(
|
||||||
api,
|
api,
|
||||||
{
|
{
|
||||||
sendEvent: sendRecvEvent,
|
sendEvent: [...sendEvent, ...sendRecvEvent],
|
||||||
receiveEvent: sendRecvEvent,
|
receiveEvent: sendRecvEvent,
|
||||||
sendState,
|
sendState,
|
||||||
receiveState,
|
receiveState,
|
||||||
|
|||||||
Reference in New Issue
Block a user