Merge branch 'krille/fixtyping' into 'main'

fix: sendTypingNotification

Closes fluffychat#221

See merge request famedly/famedlysdk!585
This commit is contained in:
Sorunome 2020-12-27 09:41:37 +00:00
commit 1fff05d663
1 changed files with 9 additions and 7 deletions

View File

@ -1469,13 +1469,15 @@ class Room {
); );
} }
Future<void> sendTypingInfo(bool isTyping, {int timeout}) { /// This tells the server that the user is typing for the next N milliseconds
var data = <String, dynamic>{ /// where N is the value specified in the timeout key. Alternatively, if typing is false,
'typing': isTyping, /// it tells the server that the user has stopped typing.
}; Future<void> sendTypingNotification(bool isTyping, {int timeout}) => client
if (timeout != null) data['timeout'] = timeout; .sendTypingNotification(client.userID, id, isTyping, timeout: timeout);
return client.sendTypingNotification(client.userID, id, isTyping);
} @Deprecated('Use sendTypingNotification instead')
Future<void> sendTypingInfo(bool isTyping, {int timeout}) =>
sendTypingNotification(isTyping, timeout: timeout);
/// This is sent by the caller when they wish to establish a call. /// This is sent by the caller when they wish to establish a call.
/// [callId] is a unique identifier for the call. /// [callId] is a unique identifier for the call.