Merge branch 'room-enhance-typinginfo-method' into 'master'
[Room] Add sendTypingInfo method See merge request famedly/famedlysdk!136
This commit is contained in:
commit
2821cdf232
|
@ -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 }
|
||||||
|
|
Loading…
Reference in a new issue