From d701108c94f50ceb4fcd05148d5bc1cc62b5d858 Mon Sep 17 00:00:00 2001 From: gekkedev <17025257+gekkedev@users.noreply.github.com> Date: Tue, 11 Jun 2024 16:37:22 +0200 Subject: [PATCH] Update listener.layer.ts --- src/api/layers/listener.layer.ts | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/api/layers/listener.layer.ts b/src/api/layers/listener.layer.ts index bf661851b..51e0898c7 100644 --- a/src/api/layers/listener.layer.ts +++ b/src/api/layers/listener.layer.ts @@ -28,6 +28,7 @@ import { ParticipantEvent, PresenceEvent, Wid, + IncomingCall, } from '../model'; import { MessageType, SocketState, SocketStream } from '../model/enum'; import { InterfaceMode } from '../model/enum/interface-mode'; @@ -501,18 +502,16 @@ export class ListenerLayer extends ProfileLayer { } /** - * @event Escuta por ligações recebidas, seja de áudio ou vídeo. - * - * Para recusar a ligação, basta chamar o `rejectCall` {@link rejectCall} - * - * @returns Objeto descartável para parar de ouvir + * @event Listen for incoming calls, whether audio or video (pending a reaction). + * To reject the call, simply call `rejectCall` {@link rejectCall} + * @returns Disposable object to stop listening */ - public onIncomingCall(callback: (call: any) => any) { + public onIncomingCall(callback: (call: IncomingCall) => any) { return this.registerEvent('onIncomingCall', callback); } /** - * Listens to presence changed, by default, it will triggered for active chats only or contacts subscribed (see {@link subscribePresence}) + * Listens to presence changed, by default, it will be triggered for active chats only or contacts subscribed (see {@link subscribePresence}) * @event Listens to presence changed * @param callback Callback of on presence changed * @returns Disposable object to stop the listening