mirror of
https://github.com/matrix-construct/construct
synced 2024-12-25 15:04:10 +01:00
modules/m_relation: Fix failure to obtain event_id from m.in_reply_to competing format.
This commit is contained in:
parent
b2bb4b1be6
commit
de0b1d9b33
1 changed files with 9 additions and 2 deletions
|
@ -75,9 +75,16 @@ try
|
|||
if(!m_relates_to || json::type(m_relates_to) != json::OBJECT)
|
||||
return;
|
||||
|
||||
const event::id &event_id
|
||||
const json::object &m_in_reply_to
|
||||
{
|
||||
m_relates_to.get<json::string>("event_id")
|
||||
content["m.in_reply_to"]
|
||||
};
|
||||
|
||||
const m::event::id &event_id
|
||||
{
|
||||
json::type(m_in_reply_to, std::nothrow) == json::OBJECT?
|
||||
m_in_reply_to.get<json::string>("event_id"):
|
||||
m_relates_to.get<json::string>("event_id")
|
||||
};
|
||||
|
||||
// If the relates_to is a prev_event then the vm::fetch unit will perform
|
||||
|
|
Loading…
Reference in a new issue