mirror of
https://github.com/matrix-construct/construct
synced 2024-10-02 13:48:53 +02:00
modules/client/rooms/typing: Add the typing commitment here for now.
This commit is contained in:
parent
7ae6ad47ea
commit
67b2f13c64
1 changed files with 27 additions and 4 deletions
|
@ -43,10 +43,33 @@ put__typing(client &client,
|
||||||
request.at<bool>("typing")
|
request.at<bool>("typing")
|
||||||
};
|
};
|
||||||
|
|
||||||
log::debug("%s typing: %d timeout: %ld",
|
json::iov event, content;
|
||||||
user_id,
|
const json::iov::push push[]
|
||||||
typing,
|
{
|
||||||
timeout.count());
|
{ event, { "type", "m.typing" } },
|
||||||
|
{ event, { "room_id", room_id } },
|
||||||
|
{ content, { "user_id", request.user_id } },
|
||||||
|
{ content, { "room_id", room_id } },
|
||||||
|
{ content, { "typing", typing } },
|
||||||
|
};
|
||||||
|
|
||||||
|
m::vm::opts opts;
|
||||||
|
opts.hash = false;
|
||||||
|
opts.sign = false;
|
||||||
|
opts.event_id = false;
|
||||||
|
opts.origin = true;
|
||||||
|
opts.origin_server_ts = false;
|
||||||
|
opts.conforming = false;
|
||||||
|
|
||||||
|
m::vm::commit(event, content, opts);
|
||||||
|
|
||||||
|
log::debug
|
||||||
|
{
|
||||||
|
"%s typing[%b] timeout: %ld",
|
||||||
|
request.user_id,
|
||||||
|
typing,
|
||||||
|
timeout.count()
|
||||||
|
};
|
||||||
|
|
||||||
return resource::response
|
return resource::response
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue