File indexing completed on 2024-02-25 16:44:38

0001 /*
0002    SPDX-FileCopyrightText: 2023-2024 Laurent Montel <montel.org>
0003 
0004    SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #include "moderationmessagesmodel.h"
0008 #include "moderation/moderationlistmessages.h"
0009 
0010 ModerationMessagesModel::ModerationMessagesModel(RocketChatAccount *account, QObject *parent)
0011     : CommonMessagesModel{account, parent}
0012 {
0013 }
0014 
0015 ModerationMessagesModel::~ModerationMessagesModel() = default;
0016 
0017 QVector<Message> ModerationMessagesModel::extractMessages(const QJsonObject &obj)
0018 {
0019     ModerationListMessages messages;
0020     messages.parseMessages(obj, QStringLiteral("messages"));
0021     return messages.listMessages();
0022 }
0023 
0024 #include "moc_moderationmessagesmodel.cpp"