[Room] Add sendTypingInfo method

This commit is contained in:
Christian Pauly 2019-12-16 11:55:13 +00:00
parent ef09f099e0
commit 834f72704a

View file

@ -974,6 +974,18 @@ class Room {
data: data);
return resp;
}
Future<dynamic> sendTypingInfo(bool isTyping, {int timeout}) {
Map<String,dynamic> data = {
"typing": isTyping,
};
if (timeout != null) data["timeout"] = timeout;
return client.connection.jsonRequest(
type: HTTPType.PUT,
action: "/client/r0/rooms/${this.id}/typing/${client.userID}",
data: data,
);
}
}
enum PushRuleState { notify, mentions_only, dont_notify }