mirror of
https://github.com/matrix-construct/construct
synced 2024-10-03 22:28:52 +02:00
modules/client/rooms/read_markers: Handle room_id has read marker.
This commit is contained in:
parent
c6b9c06302
commit
275fe9d957
1 changed files with 16 additions and 2 deletions
|
@ -32,8 +32,22 @@ post__read_markers(client &client,
|
||||||
m_read?: m_fully_read
|
m_read?: m_fully_read
|
||||||
};
|
};
|
||||||
|
|
||||||
if(marker)
|
if(marker) switch(m::sigil(marker))
|
||||||
|
{
|
||||||
|
case m::id::EVENT:
|
||||||
m::receipt::read(room_id, request.user_id, marker);
|
m::receipt::read(room_id, request.user_id, marker);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case m::id::ROOM:
|
||||||
|
m::receipt::read(room_id, request.user_id, m::head(m::room::id(marker)));
|
||||||
|
break;
|
||||||
|
|
||||||
|
default: log::dwarning
|
||||||
|
{
|
||||||
|
"Unhandled read marker '%s' sigil type",
|
||||||
|
string_view{marker}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
return resource::response
|
return resource::response
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue