Calling support

This commit is contained in:
Peter Thatcher 2020-06-04 11:16:19 -07:00 committed by Scott Nonnenberg
parent 83574eb067
commit d3a27a6442
72 changed files with 3864 additions and 191 deletions

View file

@ -478,6 +478,7 @@ const URL_CALLS = {
accounts: 'v1/accounts',
updateDeviceName: 'v1/accounts/name',
removeSignalingKey: 'v1/accounts/signaling_key',
getIceServers: 'v1/accounts/turn',
attachmentId: 'v2/attachments/form/upload',
deliveryCert: 'v1/certificate/delivery',
supportUnauthenticatedDelivery: 'v1/devices/unauthenticated_delivery',
@ -541,6 +542,7 @@ export type WebAPIType = {
getAttachment: (cdnKey: string, cdnNumber: number) => Promise<any>;
getAvatar: (path: string) => Promise<any>;
getDevices: () => Promise<any>;
getIceServers: () => Promise<any>;
getKeysForIdentifier: (
identifier: string,
deviceId?: number
@ -702,6 +704,7 @@ export function initialize({
getAttachment,
getAvatar,
getDevices,
getIceServers,
getKeysForIdentifier,
getKeysForIdentifierUnauth,
getMessageSocket,
@ -983,6 +986,13 @@ export function initialize({
});
}
async function getIceServers() {
return _ajax({
call: 'getIceServers',
httpType: 'GET',
});
}
async function removeSignalingKey() {
return _ajax({
call: 'removeSignalingKey',