From f91349a45e1545df43e5abd17722eb057e302296 Mon Sep 17 00:00:00 2001 From: Christian Pauly Date: Sun, 27 Dec 2020 09:58:14 +0100 Subject: [PATCH] fix: sendTypingNotification --- lib/src/room.dart | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/lib/src/room.dart b/lib/src/room.dart index 204d046c..a5f0eee7 100644 --- a/lib/src/room.dart +++ b/lib/src/room.dart @@ -1469,13 +1469,15 @@ class Room { ); } - Future sendTypingInfo(bool isTyping, {int timeout}) { - var data = { - 'typing': isTyping, - }; - if (timeout != null) data['timeout'] = timeout; - return client.sendTypingNotification(client.userID, id, isTyping); - } + /// This tells the server that the user is typing for the next N milliseconds + /// where N is the value specified in the timeout key. Alternatively, if typing is false, + /// it tells the server that the user has stopped typing. + Future sendTypingNotification(bool isTyping, {int timeout}) => client + .sendTypingNotification(client.userID, id, isTyping, timeout: timeout); + + @Deprecated('Use sendTypingNotification instead') + Future sendTypingInfo(bool isTyping, {int timeout}) => + sendTypingNotification(isTyping, timeout: timeout); /// This is sent by the caller when they wish to establish a call. /// [callId] is a unique identifier for the call.