Add report message functionality
This commit is contained in:
parent
bbfbba30b0
commit
bb971b0575
6 changed files with 114 additions and 2 deletions
|
|
@ -1607,6 +1607,14 @@ TimelineModel::redactAllFromUser(const QString &userid, const QString &reason)
|
|||
std::this_thread::sleep_for(std::chrono::milliseconds(50));
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
TimelineModel::reportEvent(const QString &eventId, const QString &reason, const int score)
|
||||
{
|
||||
http::client()->report_event(
|
||||
room_id_.toStdString(), eventId.toStdString(), reason.toStdString(), score);
|
||||
}
|
||||
|
||||
void
|
||||
TimelineModel::redactEvent(const QString &id, const QString &reason)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -333,6 +333,8 @@ public:
|
|||
Q_INVOKABLE void showReadReceipts(const QString &id);
|
||||
Q_INVOKABLE void redactEvent(const QString &id, const QString &reason = "");
|
||||
Q_INVOKABLE void redactAllFromUser(const QString &userid, const QString &reason = "");
|
||||
Q_INVOKABLE void
|
||||
reportEvent(const QString &eventId, const QString &reason = {}, const int score = -50);
|
||||
Q_INVOKABLE int idToIndex(const QString &id) const;
|
||||
Q_INVOKABLE QString indexToId(int index) const;
|
||||
Q_INVOKABLE void openMedia(const QString &eventId);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue