mirror of
https://github.com/matrix-construct/construct
synced 2024-11-17 23:40:57 +01:00
modules/federation/invite: Add conf item for venkmanism; minor cleanup.
This commit is contained in:
parent
baaca77c54
commit
a51daa7008
1 changed files with 9 additions and 6 deletions
|
@ -51,6 +51,13 @@ method_put
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
conf::item<milliseconds>
|
||||||
|
stream_cross_sleeptime
|
||||||
|
{
|
||||||
|
{ "name", "ircd.federation.invite.stream_cross_sleeptime" },
|
||||||
|
{ "default", 3000L },
|
||||||
|
};
|
||||||
|
|
||||||
resource::response
|
resource::response
|
||||||
put__invite(client &client,
|
put__invite(client &client,
|
||||||
const resource::request &request)
|
const resource::request &request)
|
||||||
|
@ -117,11 +124,7 @@ put__invite(client &client,
|
||||||
|
|
||||||
const json::value array[2]
|
const json::value array[2]
|
||||||
{
|
{
|
||||||
json::value
|
json::value{200L}, json::members
|
||||||
{
|
|
||||||
200L
|
|
||||||
},
|
|
||||||
json::members
|
|
||||||
{
|
{
|
||||||
{ "event", revent }
|
{ "event", revent }
|
||||||
}
|
}
|
||||||
|
@ -145,7 +148,7 @@ put__invite(client &client,
|
||||||
|
|
||||||
// Synapse needs time to process our response otherwise our eval below may
|
// Synapse needs time to process our response otherwise our eval below may
|
||||||
// complete before this response arrives for them and is processed.
|
// complete before this response arrives for them and is processed.
|
||||||
ctx::sleep(3);
|
ctx::sleep(milliseconds(stream_cross_sleeptime));
|
||||||
|
|
||||||
// Eval the dual-signed invite event. This will write it locally. This will
|
// Eval the dual-signed invite event. This will write it locally. This will
|
||||||
// also try to sync the room as best as possible. The invitee will then be
|
// also try to sync the room as best as possible. The invitee will then be
|
||||||
|
|
Loading…
Reference in a new issue