Merge branch 'room-enhance-typinginfo-method' into 'master'

[Room] Add sendTypingInfo method

See merge request famedly/famedlysdk!136
This commit is contained in:
Christian Pauly 2019-12-16 11:58:41 +00:00
commit 2821cdf232

View file

@ -974,6 +974,18 @@ class Room {
data: data); data: data);
return resp; 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 } enum PushRuleState { notify, mentions_only, dont_notify }