0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2025-01-14 16:46:50 +01:00

ircd:Ⓜ️:user::tokens: Allow undefined device_id in ircd.access_token w/o throwing.

This commit is contained in:
Jason Volk 2023-02-13 21:13:46 -08:00
parent 028c456aca
commit 84539e3d95
2 changed files with 4 additions and 3 deletions

View file

@ -261,10 +261,11 @@ ircd::m::user::tokens::device(std::nothrow_t,
{
const json::string &device_id
{
content.at("device_id")
content["device_id"]
};
ret = device_id;
if(device_id)
ret = device_id;
});
return ret;

View file

@ -13676,7 +13676,7 @@ console_cmd__user__tokens(opt &out, const string_view &line)
const auto device_id
{
m::user::tokens::device(token)
m::user::tokens::device(std::nothrow, token)
};
out