mirror of
https://github.com/matrix-construct/construct
synced 2024-12-27 07:54:05 +01:00
modules/client/rooms/account_data: Move checkpoint to cover both linear branches.
This commit is contained in:
parent
f7fa89b061
commit
7042d8e041
1 changed files with 7 additions and 8 deletions
|
@ -46,12 +46,19 @@ ircd::m::sync::room_account_data_linear(data &data)
|
|||
if(json::get<"room_id"_>(event) != data.user_room.room_id)
|
||||
return false;
|
||||
|
||||
json::stack::checkpoint checkpoint
|
||||
{
|
||||
*data.out
|
||||
};
|
||||
|
||||
if(room_account_data_linear_events(data, event))
|
||||
return true;
|
||||
|
||||
checkpoint.rollback();
|
||||
if(room_account_data_linear_tags(data, event))
|
||||
return true;
|
||||
|
||||
checkpoint.rollback();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -257,11 +264,6 @@ ircd::m::sync::room_account_data_polylog_events_event(data &data,
|
|||
bool
|
||||
ircd::m::sync::room_account_data_polylog_tags(data &data)
|
||||
{
|
||||
json::stack::checkpoint checkpoint
|
||||
{
|
||||
*data.out
|
||||
};
|
||||
|
||||
json::stack::object object
|
||||
{
|
||||
*data.out
|
||||
|
@ -318,8 +320,5 @@ ircd::m::sync::room_account_data_polylog_tags(data &data)
|
|||
return true;
|
||||
});
|
||||
|
||||
if(!ret)
|
||||
checkpoint.rollback();
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue