mirror of
https://github.com/matrix-construct/construct
synced 2024-11-25 16:22:35 +01:00
modules/federation/get_missing_events: No break on missing event; check path parc.
This commit is contained in:
parent
b79494adb9
commit
6356f62de2
1 changed files with 17 additions and 1 deletions
|
@ -64,6 +64,12 @@ resource::response
|
|||
get__missing_events(client &client,
|
||||
const resource::request &request)
|
||||
{
|
||||
if(request.parv.size() < 1)
|
||||
throw m::NEED_MORE_PARAMS
|
||||
{
|
||||
"room_id path parameter required"
|
||||
};
|
||||
|
||||
m::room::id::buf room_id
|
||||
{
|
||||
url::decode(request.parv[0], room_id)
|
||||
|
@ -108,7 +114,7 @@ get__missing_events(client &client,
|
|||
std::vector<std::string> ret;
|
||||
ret.reserve(limit);
|
||||
size_t goose{0};
|
||||
for(const auto &event_id : earliest)
|
||||
for(const auto &event_id : earliest) try
|
||||
{
|
||||
m::room::messages it
|
||||
{
|
||||
|
@ -126,6 +132,16 @@ get__missing_events(client &client,
|
|||
break;
|
||||
}
|
||||
}
|
||||
catch(const std::exception &e)
|
||||
{
|
||||
log::derror
|
||||
{
|
||||
"Request from %s for earliest missing %s :%s",
|
||||
string(remote(client)),
|
||||
unquote(event_id),
|
||||
e.what()
|
||||
};
|
||||
}
|
||||
|
||||
return resource::response
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue