0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2025-01-13 08:23:56 +01:00

modules/m_receipt: Shuffle around elements of the receipt vector.

This commit is contained in:
Jason Volk 2018-04-28 02:46:11 -07:00
parent 42f10271ae
commit 16f16678d8
2 changed files with 16 additions and 7 deletions

View file

@ -70,6 +70,20 @@ commit__m_receipt_m_read(const m::room::id &room_id,
if(!fresher__m_receipt_m_read(room_id, user_id, event_id))
return {};
const m::user::room user_room
{
user_id
};
const auto evid
{
send(user_room, user_id, "ircd.read", room_id,
{
{ "event_id", event_id },
{ "ts", ms }
})
};
const json::value event_ids[]
{
{ event_id }
@ -88,6 +102,7 @@ commit__m_receipt_m_read(const m::room::id &room_id,
const json::iov::push push[]
{
{ event, { "type", "m.receipt" } },
{ event, { "room_id", room_id } },
{ content, { room_id,
{
{ "m.read",

View file

@ -186,13 +186,7 @@ try
});
m::vm::opts vmopts;
vmopts.non_conform.set(m::event::conforms::INVALID_OR_MISSING_EVENT_ID);
vmopts.non_conform.set(m::event::conforms::MISSING_ORIGIN_SIGNATURE);
vmopts.non_conform.set(m::event::conforms::MISSING_SIGNATURES);
vmopts.non_conform.set(m::event::conforms::MISSING_PREV_EVENTS);
vmopts.non_conform.set(m::event::conforms::MISSING_PREV_STATE);
vmopts.non_conform.set(m::event::conforms::DEPTH_NEGATIVE);
vmopts.non_conform.set(m::event::conforms::DEPTH_ZERO);
vmopts.conforming = false;
m::vm::eval eval
{
receipt, vmopts