mirror of
https://github.com/matrix-construct/construct
synced 2024-06-01 09:38:58 +02:00
modules/client/sync/presence: Assert content.user_id made it to presence linear.
This commit is contained in:
parent
2451e3933f
commit
ce5ebd4a1a
|
@ -44,9 +44,14 @@ ircd::m::sync::presence_linear(data &data)
|
|||
if(!my_host(json::get<"origin"_>(event)))
|
||||
return false;
|
||||
|
||||
const json::object &content
|
||||
{
|
||||
at<"content"_>(event)
|
||||
};
|
||||
|
||||
const json::string &sender
|
||||
{
|
||||
at<"content"_>(event).get("user_id")
|
||||
content["user_id"]
|
||||
};
|
||||
|
||||
const m::user::mitsein mitsein
|
||||
|
@ -54,6 +59,7 @@ ircd::m::sync::presence_linear(data &data)
|
|||
data.user
|
||||
};
|
||||
|
||||
assert(sender);
|
||||
if(!mitsein.has(m::user::id(sender), "join"))
|
||||
return false;
|
||||
|
||||
|
|
Loading…
Reference in a new issue