mirror of
https://github.com/matrix-construct/construct
synced 2024-12-25 23:14:13 +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,8 +75,15 @@ 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
|
||||
{
|
||||
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")
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue