mirror of
https://github.com/matrix-construct/construct
synced 2025-03-14 05:20:17 +01:00
ircd:Ⓜ️:room::aliases::cache: Improve response room_id condition.
This commit is contained in:
parent
fb21e0d62e
commit
a90297b843
1 changed files with 7 additions and 7 deletions
|
@ -392,7 +392,12 @@ try
|
|||
request
|
||||
};
|
||||
|
||||
if(!response.has("room_id"))
|
||||
const json::string &room_id
|
||||
{
|
||||
response["room_id"]
|
||||
};
|
||||
|
||||
if(!valid(m::id::ROOM, room_id))
|
||||
throw m::NOT_FOUND
|
||||
{
|
||||
"Server '%s' does not know room_id for %s",
|
||||
|
@ -400,12 +405,7 @@ try
|
|||
string_view{alias},
|
||||
};
|
||||
|
||||
const m::room::id &room_id
|
||||
{
|
||||
unquote(response["room_id"])
|
||||
};
|
||||
|
||||
set(alias, room_id);
|
||||
set(alias, m::id::room(room_id));
|
||||
}
|
||||
catch(const ctx::timeout &e)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue