EventSource Refactor
Move showing th event source to a call to RoomManager. This means the SourceRole is no longer required in the message and search models
This commit is contained in:
@@ -1334,6 +1334,16 @@ void NeoChatRoom::reportEvent(const QString &eventId, const QString &reason)
|
||||
});
|
||||
}
|
||||
|
||||
QByteArray NeoChatRoom::getEventJsonSource(const QString &eventId)
|
||||
{
|
||||
auto evtIt = findInTimeline(eventId);
|
||||
if (evtIt != messageEvents().rend() && is<RoomEvent>(**evtIt)) {
|
||||
const auto event = evtIt->viewAs<RoomEvent>();
|
||||
return QJsonDocument(event->fullJson()).toJson();
|
||||
}
|
||||
return {};
|
||||
}
|
||||
|
||||
QString NeoChatRoom::chatBoxText() const
|
||||
{
|
||||
return m_chatBoxText;
|
||||
|
||||
Reference in New Issue
Block a user