@signalapp/ringrtc 2.52.0 → 2.53.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  import { RingRTCType } from './ringrtc/Service';
2
2
  export { AnswerMessage, AudioDevice, DataMode, BusyMessage, Call, CallEndedReason, CallId, CallLogLevel, CallMessageUrgency, CallSettings, CallState, CallingMessage, ConnectionState, DeviceId, GroupCall, GroupCallEndReason, GroupCallKind, GroupCallObserver, GroupMemberInfo, HangupMessage, HangupType, HttpMethod, HttpResult, IceCandidateMessage, JoinState, LocalDeviceState, OfferMessage, OfferType, OpaqueMessage, PeekDeviceInfo, PeekInfo, PeekStatusCodes, Reaction, RemoteDeviceState, RingCancelReason, RingRTCType, RingUpdate, SpeechEvent, UserId, VideoFrameSender, VideoFrameSource, VideoPixelFormatEnum, videoPixelFormatToEnum, VideoRequest, callIdFromEra, callIdFromRingId, } from './ringrtc/Service';
3
- export { CallLinkRootKey, CallLinkRestrictions, CallLinkState, } from './ringrtc/CallLinks';
3
+ export { CallLinkRootKey, CallLinkRestrictions, CallLinkState, CallLinkEpoch, } from './ringrtc/CallLinks';
4
4
  export declare const RingRTC: RingRTCType;
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@
4
4
  // SPDX-License-Identifier: AGPL-3.0-only
5
5
  //
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.RingRTC = exports.CallLinkState = exports.CallLinkRestrictions = exports.CallLinkRootKey = exports.callIdFromRingId = exports.callIdFromEra = exports.VideoRequest = exports.videoPixelFormatToEnum = exports.VideoPixelFormatEnum = exports.SpeechEvent = exports.RingUpdate = exports.RingRTCType = exports.RingCancelReason = exports.RemoteDeviceState = exports.PeekStatusCodes = exports.OpaqueMessage = exports.OfferType = exports.OfferMessage = exports.LocalDeviceState = exports.JoinState = exports.IceCandidateMessage = exports.HttpMethod = exports.HangupType = exports.HangupMessage = exports.GroupMemberInfo = exports.GroupCallKind = exports.GroupCallEndReason = exports.GroupCall = exports.ConnectionState = exports.CallingMessage = exports.CallState = exports.CallMessageUrgency = exports.CallLogLevel = exports.CallEndedReason = exports.Call = exports.BusyMessage = exports.DataMode = exports.AnswerMessage = void 0;
7
+ exports.RingRTC = exports.CallLinkEpoch = exports.CallLinkState = exports.CallLinkRestrictions = exports.CallLinkRootKey = exports.callIdFromRingId = exports.callIdFromEra = exports.VideoRequest = exports.videoPixelFormatToEnum = exports.VideoPixelFormatEnum = exports.SpeechEvent = exports.RingUpdate = exports.RingRTCType = exports.RingCancelReason = exports.RemoteDeviceState = exports.PeekStatusCodes = exports.OpaqueMessage = exports.OfferType = exports.OfferMessage = exports.LocalDeviceState = exports.JoinState = exports.IceCandidateMessage = exports.HttpMethod = exports.HangupType = exports.HangupMessage = exports.GroupMemberInfo = exports.GroupCallKind = exports.GroupCallEndReason = exports.GroupCall = exports.ConnectionState = exports.CallingMessage = exports.CallState = exports.CallMessageUrgency = exports.CallLogLevel = exports.CallEndedReason = exports.Call = exports.BusyMessage = exports.DataMode = exports.AnswerMessage = void 0;
8
8
  const Service_1 = require("./ringrtc/Service");
9
9
  var Service_2 = require("./ringrtc/Service");
10
10
  Object.defineProperty(exports, "AnswerMessage", { enumerable: true, get: function () { return Service_2.AnswerMessage; } });
@@ -45,5 +45,6 @@ var CallLinks_1 = require("./ringrtc/CallLinks");
45
45
  Object.defineProperty(exports, "CallLinkRootKey", { enumerable: true, get: function () { return CallLinks_1.CallLinkRootKey; } });
46
46
  Object.defineProperty(exports, "CallLinkRestrictions", { enumerable: true, get: function () { return CallLinks_1.CallLinkRestrictions; } });
47
47
  Object.defineProperty(exports, "CallLinkState", { enumerable: true, get: function () { return CallLinks_1.CallLinkState; } });
48
+ Object.defineProperty(exports, "CallLinkEpoch", { enumerable: true, get: function () { return CallLinks_1.CallLinkEpoch; } });
48
49
  exports.RingRTC = new Service_1.RingRTCType();
49
50
  //# sourceMappingURL=index.js.map
@@ -13,10 +13,17 @@ export declare class CallLinkState {
13
13
  restrictions: CallLinkRestrictions;
14
14
  revoked: boolean;
15
15
  expiration: Date;
16
- constructor(name: string, restrictions: CallLinkRestrictions, revoked: boolean, expiration: Date);
16
+ epoch?: CallLinkEpoch | undefined;
17
+ constructor(name: string, restrictions: CallLinkRestrictions, revoked: boolean, expiration: Date, epoch?: CallLinkEpoch | undefined);
17
18
  }
18
19
  export declare enum CallLinkRestrictions {
19
20
  None = 0,
20
21
  AdminApproval = 1,
21
22
  Unknown = 2
22
23
  }
24
+ export declare class CallLinkEpoch {
25
+ static parse(str: string): CallLinkEpoch;
26
+ toString(): string;
27
+ get bytes(): Uint8Array;
28
+ static fromBytes(bytes: Uint8Array): CallLinkEpoch;
29
+ }
@@ -7,7 +7,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
7
7
  return (mod && mod.__esModule) ? mod : { "default": mod };
8
8
  };
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.CallLinkRestrictions = exports.CallLinkState = exports.CallLinkRootKey = void 0;
10
+ exports.CallLinkEpoch = exports.CallLinkRestrictions = exports.CallLinkState = exports.CallLinkRootKey = void 0;
11
11
  const Native_1 = __importDefault(require("./Native"));
12
12
  class CallLinkRootKey {
13
13
  constructor(bytes) {
@@ -38,11 +38,12 @@ class CallLinkRootKey {
38
38
  }
39
39
  exports.CallLinkRootKey = CallLinkRootKey;
40
40
  class CallLinkState {
41
- constructor(name, restrictions, revoked, expiration) {
41
+ constructor(name, restrictions, revoked, expiration, epoch) {
42
42
  this.name = name;
43
43
  this.restrictions = restrictions;
44
44
  this.revoked = revoked;
45
45
  this.expiration = expiration;
46
+ this.epoch = epoch;
46
47
  }
47
48
  }
48
49
  exports.CallLinkState = CallLinkState;
@@ -52,4 +53,35 @@ var CallLinkRestrictions;
52
53
  CallLinkRestrictions[CallLinkRestrictions["AdminApproval"] = 1] = "AdminApproval";
53
54
  CallLinkRestrictions[CallLinkRestrictions["Unknown"] = 2] = "Unknown";
54
55
  })(CallLinkRestrictions || (exports.CallLinkRestrictions = CallLinkRestrictions = {}));
56
+ class CallLinkEpoch {
57
+ /** @internal */
58
+ constructor(value) {
59
+ this.value = value;
60
+ }
61
+ /** @internal */
62
+ asNumber() {
63
+ return this.value;
64
+ }
65
+ static parse(str) {
66
+ return new CallLinkEpoch(Native_1.default.CallLinkEpoch_parse(str));
67
+ }
68
+ toString() {
69
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
70
+ return Native_1.default.CallLinkEpoch_toFormattedString(this.value);
71
+ }
72
+ get bytes() {
73
+ const value = this.value & 0xffffffff;
74
+ const bytes = new Uint8Array(4);
75
+ bytes[0] = value & 0x000000ff;
76
+ bytes[1] = (value & 0x0000ff00) >> 8;
77
+ bytes[2] = (value & 0x00ff0000) >> 16;
78
+ bytes[3] = (value & 0xff000000) >> 24;
79
+ return bytes;
80
+ }
81
+ static fromBytes(bytes) {
82
+ const value = bytes[0] + bytes[1] * 0x100 + 0x10000 * (bytes[2] + bytes[3] * 0x100);
83
+ return new CallLinkEpoch(value);
84
+ }
85
+ }
86
+ exports.CallLinkEpoch = CallLinkEpoch;
55
87
  //# sourceMappingURL=CallLinks.js.map
@@ -1,4 +1,4 @@
1
- import { CallLinkState, CallLinkRestrictions, CallLinkRootKey } from './CallLinks';
1
+ import { CallLinkState, CallLinkRestrictions, CallLinkRootKey, CallLinkEpoch } from './CallLinks';
2
2
  export declare const callIdFromEra: (era: string) => CallId;
3
3
  export declare function callIdFromRingId(ringId: bigint): CallId;
4
4
  declare class Config {
@@ -74,6 +74,7 @@ interface RawCallLinkState {
74
74
  rawRestrictions: number;
75
75
  revoked: boolean;
76
76
  expiration: Date;
77
+ epoch?: number;
77
78
  }
78
79
  export type EmptyObj = Record<PropertyKey, never>;
79
80
  export type HttpResult<T> = {
@@ -133,11 +134,12 @@ export declare class RingRTCType {
133
134
  * @param sfuUrl - the URL to use when accessing the SFU
134
135
  * @param authCredentialPresentation - a serialized CallLinkAuthCredentialPresentation
135
136
  * @param linkRootKey - the root key for the call link
137
+ * @param epoch - the optional call link epoch
136
138
  *
137
139
  * Expected failure codes include:
138
140
  * - 404: the room does not exist (or expired so long ago that it has been removed from the server)
139
141
  */
140
- readCallLink(sfuUrl: string, authCredentialPresentation: Buffer, linkRootKey: CallLinkRootKey): Promise<HttpResult<CallLinkState>>;
142
+ readCallLink(sfuUrl: string, authCredentialPresentation: Buffer, linkRootKey: CallLinkRootKey, epoch: CallLinkEpoch | undefined): Promise<HttpResult<CallLinkState>>;
141
143
  /**
142
144
  * Asynchronous request to create a new call link.
143
145
  *
@@ -187,10 +189,11 @@ export declare class RingRTCType {
187
189
  * @param sfuUrl - the URL to use when accessing the SFU
188
190
  * @param authCredentialPresentation - a serialized CallLinkAuthCredentialPresentation
189
191
  * @param linkRootKey - the root key for the call link
192
+ * @param epoch - the optional call link epoch
190
193
  * @param adminPasskey - the passkey specified when the link was created
191
194
  * @param newName - the new name to use
192
195
  */
193
- updateCallLinkName(sfuUrl: string, authCredentialPresentation: Buffer, linkRootKey: CallLinkRootKey, adminPasskey: Buffer, newName: string): Promise<HttpResult<CallLinkState>>;
196
+ updateCallLinkName(sfuUrl: string, authCredentialPresentation: Buffer, linkRootKey: CallLinkRootKey, epoch: CallLinkEpoch | undefined, adminPasskey: Buffer, newName: string): Promise<HttpResult<CallLinkState>>;
194
197
  /**
195
198
  * Asynchronous request to update a call link's restrictions.
196
199
  *
@@ -204,10 +207,11 @@ export declare class RingRTCType {
204
207
  * @param sfuUrl - the URL to use when accessing the SFU
205
208
  * @param authCredentialPresentation - a serialized CallLinkAuthCredentialPresentation
206
209
  * @param linkRootKey - the root key for the call link
210
+ * @param epoch - the optional call link epoch
207
211
  * @param adminPasskey - the passkey specified when the link was created
208
212
  * @param restrictions - the new restrictions to use
209
213
  */
210
- updateCallLinkRestrictions(sfuUrl: string, authCredentialPresentation: Buffer, linkRootKey: CallLinkRootKey, adminPasskey: Buffer, restrictions: Exclude<CallLinkRestrictions, CallLinkRestrictions.Unknown>): Promise<HttpResult<CallLinkState>>;
214
+ updateCallLinkRestrictions(sfuUrl: string, authCredentialPresentation: Buffer, linkRootKey: CallLinkRootKey, epoch: CallLinkEpoch | undefined, adminPasskey: Buffer, restrictions: Exclude<CallLinkRestrictions, CallLinkRestrictions.Unknown>): Promise<HttpResult<CallLinkState>>;
211
215
  /**
212
216
  * Asynchronous request to delete a call link.
213
217
  *
@@ -220,15 +224,16 @@ export declare class RingRTCType {
220
224
  * @param sfuUrl - the URL to use when accessing the SFU
221
225
  * @param authCredentialPresentation - a serialized CallLinkAuthCredentialPresentation
222
226
  * @param linkRootKey - the root key for the call link
227
+ * @param epoch - the optional call link epoch
223
228
  * @param adminPasskey - the passkey specified when the link was created
224
229
  */
225
- deleteCallLink(sfuUrl: string, authCredentialPresentation: Buffer, linkRootKey: CallLinkRootKey, adminPasskey: Buffer): Promise<HttpResult<undefined>>;
230
+ deleteCallLink(sfuUrl: string, authCredentialPresentation: Buffer, linkRootKey: CallLinkRootKey, epoch: CallLinkEpoch | undefined, adminPasskey: Buffer): Promise<HttpResult<undefined>>;
226
231
  receivedHttpResponse(requestId: number, status: number, body: Buffer): void;
227
232
  httpRequestFailed(requestId: number, debugInfo: string | undefined): void;
228
233
  getGroupCall(groupId: Buffer, sfuUrl: string, hkdfExtraInfo: Buffer, audioLevelsIntervalMillis: number | undefined, observer: GroupCallObserver): GroupCall | undefined;
229
- getCallLinkCall(sfuUrl: string, authCredentialPresentation: Buffer, rootKey: CallLinkRootKey, adminPasskey: Buffer | undefined, hkdfExtraInfo: Buffer, audioLevelsIntervalMillis: number | undefined, observer: GroupCallObserver): GroupCall | undefined;
234
+ getCallLinkCall(sfuUrl: string, authCredentialPresentation: Buffer, rootKey: CallLinkRootKey, epoch: CallLinkEpoch | undefined, adminPasskey: Buffer | undefined, hkdfExtraInfo: Buffer, audioLevelsIntervalMillis: number | undefined, observer: GroupCallObserver): GroupCall | undefined;
230
235
  peekGroupCall(sfuUrl: string, membershipProof: Buffer, groupMembers: Array<GroupMemberInfo>): Promise<PeekInfo>;
231
- peekCallLinkCall(sfuUrl: string, authCredentialPresentation: Buffer, rootKey: CallLinkRootKey): Promise<HttpResult<PeekInfo>>;
236
+ peekCallLinkCall(sfuUrl: string, authCredentialPresentation: Buffer, rootKey: CallLinkRootKey, epoch: CallLinkEpoch | undefined): Promise<HttpResult<PeekInfo>>;
232
237
  requestMembershipProof(clientId: GroupCallClientId): void;
233
238
  requestGroupMembers(clientId: GroupCallClientId): void;
234
239
  handleConnectionStateChanged(clientId: GroupCallClientId, connectionState: ConnectionState): void;
@@ -671,7 +676,7 @@ export interface CallManager {
671
676
  receivedHttpResponse(requestId: number, status: number, body: Buffer): void;
672
677
  httpRequestFailed(requestId: number, debugInfo: string | undefined): void;
673
678
  createGroupCallClient(groupId: Buffer, sfuUrl: string, hkdfExtraInfo: Buffer, audioLevelsIntervalMillis: number): GroupCallClientId;
674
- createCallLinkCallClient(sfuUrl: string, authCredentialPresentation: Buffer, linkRootKey: Buffer, adminPasskey: Buffer | undefined, hkdfExtraInfo: Buffer, audioLevelsIntervalMillis: number): GroupCallClientId;
679
+ createCallLinkCallClient(sfuUrl: string, authCredentialPresentation: Buffer, linkRootKey: Buffer, epoch: number | undefined, adminPasskey: Buffer | undefined, hkdfExtraInfo: Buffer, audioLevelsIntervalMillis: number): GroupCallClientId;
675
680
  deleteGroupCallClient(clientId: GroupCallClientId): void;
676
681
  connect(clientId: GroupCallClientId): void;
677
682
  join(clientId: GroupCallClientId): void;
@@ -697,12 +702,12 @@ export interface CallManager {
697
702
  setMembershipProof(clientId: GroupCallClientId, proof: Buffer): void;
698
703
  receiveGroupCallVideoFrame(clientId: GroupCallClientId, remoteDemuxId: number, buffer: Buffer, maxWidth: number, maxHeight: number): [number, number] | undefined;
699
704
  setRtcStatsInterval(clientId: GroupCallClientId, intervalMillis: number): void;
700
- readCallLink(requestId: number, sfuUrl: string, authCredentialPresentation: Buffer, linkRootKey: Buffer): void;
705
+ readCallLink(requestId: number, sfuUrl: string, authCredentialPresentation: Buffer, linkRootKey: Buffer, epoch: number | undefined): void;
701
706
  createCallLink(requestId: number, sfuUrl: string, createCredentialPresentation: Buffer, linkRootKey: Buffer, adminPasskey: Buffer, callLinkPublicParams: Buffer, restrictions: number | undefined): void;
702
- updateCallLink(requestId: number, sfuUrl: string, authCredentialPresentation: Buffer, linkRootKey: Buffer, adminPasskey: Buffer, newName: string | undefined, newRestrictions: number | undefined, newRevoked: boolean | undefined): void;
703
- deleteCallLink(requestId: number, sfuUrl: string, authCredentialPresentation: Buffer, linkRootKey: Buffer, adminPasskey: Buffer): void;
707
+ updateCallLink(requestId: number, sfuUrl: string, authCredentialPresentation: Buffer, linkRootKey: Buffer, epoch: number | undefined, adminPasskey: Buffer, newName: string | undefined, newRestrictions: number | undefined, newRevoked: boolean | undefined): void;
708
+ deleteCallLink(requestId: number, sfuUrl: string, authCredentialPresentation: Buffer, linkRootKey: Buffer, epoch: number | undefined, adminPasskey: Buffer): void;
704
709
  peekGroupCall(requestId: number, sfu_url: string, membership_proof: Buffer, group_members: Array<GroupMemberInfo>): void;
705
- peekCallLinkCall(requestId: number, sfuUrl: string, authCredentialPresentation: Buffer, linkRootKey: Buffer): void;
710
+ peekCallLinkCall(requestId: number, sfuUrl: string, authCredentialPresentation: Buffer, linkRootKey: Buffer, epoch: number | undefined): void;
706
711
  getAudioInputs(): Array<AudioDevice>;
707
712
  setAudioInput(index: number): void;
708
713
  getAudioOutputs(): Array<AudioDevice>;
@@ -211,7 +211,11 @@ function rawCallLinkStateToCallLinkState(raw) {
211
211
  restrictions = CallLinks_1.CallLinkRestrictions.Unknown;
212
212
  break;
213
213
  }
214
- return new CallLinks_1.CallLinkState(raw.name, restrictions, raw.revoked, raw.expiration);
214
+ let epoch;
215
+ if (raw.epoch) {
216
+ epoch = new CallLinks_1.CallLinkEpoch(raw.epoch);
217
+ }
218
+ return new CallLinks_1.CallLinkState(raw.name, restrictions, raw.revoked, raw.expiration, epoch);
215
219
  }
216
220
  else {
217
221
  return undefined;
@@ -570,15 +574,16 @@ class RingRTCType {
570
574
  * @param sfuUrl - the URL to use when accessing the SFU
571
575
  * @param authCredentialPresentation - a serialized CallLinkAuthCredentialPresentation
572
576
  * @param linkRootKey - the root key for the call link
577
+ * @param epoch - the optional call link epoch
573
578
  *
574
579
  * Expected failure codes include:
575
580
  * - 404: the room does not exist (or expired so long ago that it has been removed from the server)
576
581
  */
577
- readCallLink(sfuUrl, authCredentialPresentation, linkRootKey) {
582
+ readCallLink(sfuUrl, authCredentialPresentation, linkRootKey, epoch) {
578
583
  const [requestId, promise] = this._callLinkRequests.add();
579
584
  // Response comes back via handleCallLinkResponse
580
585
  sillyDeadlockProtection(() => {
581
- this.callManager.readCallLink(requestId, sfuUrl, authCredentialPresentation, linkRootKey.bytes);
586
+ this.callManager.readCallLink(requestId, sfuUrl, authCredentialPresentation, linkRootKey.bytes, epoch?.asNumber());
582
587
  });
583
588
  return promise;
584
589
  }
@@ -638,14 +643,15 @@ class RingRTCType {
638
643
  * @param sfuUrl - the URL to use when accessing the SFU
639
644
  * @param authCredentialPresentation - a serialized CallLinkAuthCredentialPresentation
640
645
  * @param linkRootKey - the root key for the call link
646
+ * @param epoch - the optional call link epoch
641
647
  * @param adminPasskey - the passkey specified when the link was created
642
648
  * @param newName - the new name to use
643
649
  */
644
- updateCallLinkName(sfuUrl, authCredentialPresentation, linkRootKey, adminPasskey, newName) {
650
+ updateCallLinkName(sfuUrl, authCredentialPresentation, linkRootKey, epoch, adminPasskey, newName) {
645
651
  const [requestId, promise] = this._callLinkRequests.add();
646
652
  // Response comes back via handleCallLinkResponse
647
653
  sillyDeadlockProtection(() => {
648
- this.callManager.updateCallLink(requestId, sfuUrl, authCredentialPresentation, linkRootKey.bytes, adminPasskey, newName, undefined, undefined);
654
+ this.callManager.updateCallLink(requestId, sfuUrl, authCredentialPresentation, linkRootKey.bytes, epoch?.asNumber(), adminPasskey, newName, undefined, undefined);
649
655
  });
650
656
  return promise;
651
657
  }
@@ -662,14 +668,15 @@ class RingRTCType {
662
668
  * @param sfuUrl - the URL to use when accessing the SFU
663
669
  * @param authCredentialPresentation - a serialized CallLinkAuthCredentialPresentation
664
670
  * @param linkRootKey - the root key for the call link
671
+ * @param epoch - the optional call link epoch
665
672
  * @param adminPasskey - the passkey specified when the link was created
666
673
  * @param restrictions - the new restrictions to use
667
674
  */
668
- updateCallLinkRestrictions(sfuUrl, authCredentialPresentation, linkRootKey, adminPasskey, restrictions) {
675
+ updateCallLinkRestrictions(sfuUrl, authCredentialPresentation, linkRootKey, epoch, adminPasskey, restrictions) {
669
676
  const [requestId, promise] = this._callLinkRequests.add();
670
677
  // Response comes back via handleCallLinkResponse
671
678
  sillyDeadlockProtection(() => {
672
- this.callManager.updateCallLink(requestId, sfuUrl, authCredentialPresentation, linkRootKey.bytes, adminPasskey, undefined, restrictions, undefined);
679
+ this.callManager.updateCallLink(requestId, sfuUrl, authCredentialPresentation, linkRootKey.bytes, epoch?.asNumber(), adminPasskey, undefined, restrictions, undefined);
673
680
  });
674
681
  return promise;
675
682
  }
@@ -685,13 +692,14 @@ class RingRTCType {
685
692
  * @param sfuUrl - the URL to use when accessing the SFU
686
693
  * @param authCredentialPresentation - a serialized CallLinkAuthCredentialPresentation
687
694
  * @param linkRootKey - the root key for the call link
695
+ * @param epoch - the optional call link epoch
688
696
  * @param adminPasskey - the passkey specified when the link was created
689
697
  */
690
- deleteCallLink(sfuUrl, authCredentialPresentation, linkRootKey, adminPasskey) {
698
+ deleteCallLink(sfuUrl, authCredentialPresentation, linkRootKey, epoch, adminPasskey) {
691
699
  const [requestId, promise] = this._emptyRequests.add();
692
700
  // Response comes back via handleCallLinkResponse
693
701
  sillyDeadlockProtection(() => {
694
- this.callManager.deleteCallLink(requestId, sfuUrl, authCredentialPresentation, linkRootKey.bytes, adminPasskey);
702
+ this.callManager.deleteCallLink(requestId, sfuUrl, authCredentialPresentation, linkRootKey.bytes, epoch?.asNumber(), adminPasskey);
695
703
  });
696
704
  return promise;
697
705
  }
@@ -731,8 +739,8 @@ class RingRTCType {
731
739
  return groupCall;
732
740
  }
733
741
  // Called by UX
734
- getCallLinkCall(sfuUrl, authCredentialPresentation, rootKey, adminPasskey, hkdfExtraInfo, audioLevelsIntervalMillis, observer) {
735
- const clientId = this.callManager.createCallLinkCallClient(sfuUrl, authCredentialPresentation, rootKey.bytes, adminPasskey, hkdfExtraInfo, audioLevelsIntervalMillis || 0);
742
+ getCallLinkCall(sfuUrl, authCredentialPresentation, rootKey, epoch, adminPasskey, hkdfExtraInfo, audioLevelsIntervalMillis, observer) {
743
+ const clientId = this.callManager.createCallLinkCallClient(sfuUrl, authCredentialPresentation, rootKey.bytes, epoch?.asNumber(), adminPasskey, hkdfExtraInfo, audioLevelsIntervalMillis || 0);
736
744
  if (clientId === INVALID_CLIENT_ID) {
737
745
  // Return undefined since the call link client creation failed.
738
746
  return undefined;
@@ -765,11 +773,11 @@ class RingRTCType {
765
773
  });
766
774
  }
767
775
  // Called by UX
768
- peekCallLinkCall(sfuUrl, authCredentialPresentation, rootKey) {
776
+ peekCallLinkCall(sfuUrl, authCredentialPresentation, rootKey, epoch) {
769
777
  const [requestId, promise] = this._peekRequests.add();
770
778
  // Response comes back via handlePeekResponse
771
779
  sillyDeadlockProtection(() => {
772
- this.callManager.peekCallLinkCall(requestId, sfuUrl, authCredentialPresentation, rootKey.bytes);
780
+ this.callManager.peekCallLinkCall(requestId, sfuUrl, authCredentialPresentation, rootKey.bytes, epoch?.asNumber());
773
781
  });
774
782
  return promise;
775
783
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@signalapp/ringrtc",
3
- "version": "2.52.0",
3
+ "version": "2.53.0",
4
4
  "description": "Signal Messenger voice and video calling library.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -25,7 +25,7 @@
25
25
  },
26
26
  "config": {
27
27
  "prebuildUrl": "https://build-artifacts.signal.org/libraries/ringrtc-desktop-build-v${npm_package_version}.tar.gz",
28
- "prebuildChecksum": "18d020c369ac1126df868d297b535518f6731c43d750c6bd3d9268044f23b855"
28
+ "prebuildChecksum": "9f04ffe0be063600fcc23d9afd8009b873f304ef5ae59642ee143b806bf804ad"
29
29
  },
30
30
  "author": "",
31
31
  "license": "AGPL-3.0-only",