mirror of
https://github.com/matrix-construct/construct
synced 2024-11-29 18:22:50 +01:00
modules/client/sync: Readd the transaction_id on longpoll; fix ghost events.
This commit is contained in:
parent
1089530652
commit
8fee82b0d6
3 changed files with 12 additions and 0 deletions
|
@ -97,6 +97,7 @@ struct ircd::m::sync::data
|
|||
string_view membership;
|
||||
event::idx room_head {0}; // if *room
|
||||
event::idx event_idx {0}; // if *event
|
||||
string_view client_txnid;
|
||||
|
||||
data(const m::user &user,
|
||||
const m::events::range &range,
|
||||
|
|
|
@ -567,6 +567,11 @@ ircd::m::sync::longpoll::handle(data &data,
|
|||
data.event_idx, event.event_idx
|
||||
};
|
||||
|
||||
const scope_restore client_txnid
|
||||
{
|
||||
data.client_txnid, event.client_txnid
|
||||
};
|
||||
|
||||
json::stack::checkpoint checkpoint
|
||||
{
|
||||
*data.out
|
||||
|
|
|
@ -169,4 +169,10 @@ ircd::m::sync::_room_timeline_append(data &data,
|
|||
long(vm::current_sequence - event_idx)
|
||||
}
|
||||
};
|
||||
|
||||
if(data.client_txnid)
|
||||
json::stack::member
|
||||
{
|
||||
unsigned_, "transaction_id", data.client_txnid
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue