mirror of
https://github.com/matrix-construct/construct
synced 2024-11-26 08:42:34 +01:00
ircd:Ⓜ️ Improve my(event): check origin, then id, otherwise false.
This commit is contained in:
parent
da5bca588d
commit
68b5d53ae8
1 changed files with 8 additions and 1 deletions
|
@ -372,7 +372,14 @@ ircd::m::pretty_oneline(const event &event)
|
||||||
bool
|
bool
|
||||||
ircd::m::my(const event &event)
|
ircd::m::my(const event &event)
|
||||||
{
|
{
|
||||||
return my(event::id(at<"event_id"_>(event)));
|
const auto &origin(json::get<"origin"_>(event));
|
||||||
|
const auto &eid(json::get<"event_id"_>(event));
|
||||||
|
return
|
||||||
|
origin?
|
||||||
|
my_host(origin):
|
||||||
|
eid?
|
||||||
|
my(event::id(eid)):
|
||||||
|
false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
|
Loading…
Reference in a new issue