Create function for processing whether a message is a reply

This commit is contained in:
Loren Burkholder 2021-02-20 13:05:21 -05:00 committed by Nicolas Werner
parent d8fb4d9292
commit 39576fea96
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9
3 changed files with 11 additions and 1 deletions

View file

@ -24,6 +24,7 @@
#include "Cache.h"
#include "Config.h"
#include "EventAccessors.h"
#include "MatrixClient.h"
#include "UserSettingsPage.h"
@ -696,3 +697,9 @@ utils::readImage(const QByteArray *data)
reader.setAutoTransform(true);
return reader.read();
}
bool
utils::isReply(const mtx::events::collections::TimelineEvents &e)
{
return mtx::accessors::relations(e).reply_to().has_value();
}