Merge branch 'event-fix-get-reply-event' into 'master'

[Event] Fix getReplyEvent

See merge request famedly/famedlysdk!195
This commit is contained in:
Christian Pauly 2020-02-17 15:47:05 +00:00
commit d6e5937066

View file

@ -378,7 +378,7 @@ class Event {
/// Searches for the reply event in the given timeline.
Future<Event> getReplyEvent(Timeline timeline) async {
if (!isReply) return null;
final String replyEventId = content['m.relates_to']['m.in_reply_to'];
final String replyEventId = content['m.relates_to']['m.in_reply_to']['event_id'];
return await timeline.getEventById(replyEventId);
}
}