mirror of
https://github.com/matrix-construct/construct
synced 2024-09-28 19:58:53 +02:00
modules/client/sync: Use real exception handler; fix polylog call; fix presence key; unlocker.
This commit is contained in:
parent
f79000b18d
commit
163fc25790
1 changed files with 16 additions and 14 deletions
|
@ -343,7 +343,6 @@ try
|
|||
m::vm::accept.wait_until(lock, args.timesout)
|
||||
};
|
||||
|
||||
const unlock_guard<decltype(lock)> ul(lock);
|
||||
if(synchronize(client, request, args, accepted))
|
||||
return;
|
||||
}
|
||||
|
@ -546,7 +545,7 @@ update_sync(client &client,
|
|||
};
|
||||
|
||||
std::vector<json::value> presents;
|
||||
ur.get(std::nothrow, "m.presence", [&]
|
||||
ur.get(std::nothrow, "ircd.presence", [&]
|
||||
(const m::event &event)
|
||||
{
|
||||
const auto &content
|
||||
|
@ -595,18 +594,8 @@ polylog_sync(client &client,
|
|||
const resource::request &request,
|
||||
shortpoll &sp,
|
||||
json::stack::object &object)
|
||||
try
|
||||
{
|
||||
const unwind::exceptional uw{[&sp]
|
||||
{
|
||||
log::error
|
||||
{
|
||||
"polylog sync ERROR %lu to %lu (vm @ %zu)"
|
||||
,sp.since
|
||||
,sp.current
|
||||
,m::vm::current_sequence
|
||||
};
|
||||
}};
|
||||
|
||||
{
|
||||
json::stack::member member{object, "rooms"};
|
||||
json::stack::object object{member};
|
||||
|
@ -634,6 +623,19 @@ polylog_sync(client &client,
|
|||
|
||||
return sp.committed;
|
||||
}
|
||||
catch(const std::exception &e)
|
||||
{
|
||||
log::error
|
||||
{
|
||||
"polylog sync ERROR %lu to %lu (vm @ %zu) :%s"
|
||||
,sp.since
|
||||
,sp.current
|
||||
,m::vm::current_sequence
|
||||
,e.what()
|
||||
};
|
||||
|
||||
throw;
|
||||
}
|
||||
|
||||
void
|
||||
polylog_sync_presence(shortpoll &sp,
|
||||
|
@ -842,7 +844,7 @@ polylog_sync_room(shortpoll &sp,
|
|||
{
|
||||
json::stack::member member{out, "account_data"};
|
||||
json::stack::object object{member};
|
||||
polylog_sync_room_ephemeral(sp, object, room);
|
||||
polylog_sync_room_account_data(sp, object, room);
|
||||
}
|
||||
|
||||
// unread_notifications
|
||||
|
|
Loading…
Reference in a new issue