mirror of
https://github.com/matrix-construct/construct
synced 2024-11-15 14:31:11 +01:00
ircd:Ⓜ️ Ignore my_host's signature when adding signatures.
This commit is contained in:
parent
4be4186730
commit
986f591caa
1 changed files with 5 additions and 3 deletions
|
@ -724,7 +724,7 @@ ircd::m::event::signatures(const mutable_buffer &out,
|
||||||
}
|
}
|
||||||
|
|
||||||
ircd::m::event
|
ircd::m::event
|
||||||
ircd::m::signatures(const mutable_buffer &out,
|
ircd::m::signatures(const mutable_buffer &out_,
|
||||||
const m::event &event_)
|
const m::event &event_)
|
||||||
{
|
{
|
||||||
thread_local char content[64_KiB];
|
thread_local char content[64_KiB];
|
||||||
|
@ -759,9 +759,11 @@ ircd::m::signatures(const mutable_buffer &out,
|
||||||
size_t i(0);
|
size_t i(0);
|
||||||
sigs.at(i++) = my_sig;
|
sigs.at(i++) = my_sig;
|
||||||
for(const auto &other : json::get<"signatures"_>(event_))
|
for(const auto &other : json::get<"signatures"_>(event_))
|
||||||
sigs.at(i++) = { other.first, other.second };
|
if(!my_host(unquote(other.first)))
|
||||||
|
sigs.at(i++) = { other.first, other.second };
|
||||||
|
|
||||||
json::get<"signatures"_>(event) = json::stringify(mutable_buffer{out}, sigs.data(), sigs.data() + i);
|
mutable_buffer out{out_};
|
||||||
|
json::get<"signatures"_>(event) = json::stringify(out, sigs.data(), sigs.data() + i);
|
||||||
return event;
|
return event;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue