Pass NeochatRoomMembers rather than RoomMembers to menus

This commit is contained in:
James Graham
2024-07-23 18:29:35 +01:00
parent 4e3a61d166
commit 32d4d9f75f
2 changed files with 6 additions and 4 deletions

View File

@@ -11,6 +11,7 @@
#include "neochatconfig.h" #include "neochatconfig.h"
#include "neochatconnection.h" #include "neochatconnection.h"
#include "neochatroom.h" #include "neochatroom.h"
#include "neochatroommember.h"
#include "spacehierarchycache.h" #include "spacehierarchycache.h"
#include "urlhelper.h" #include "urlhelper.h"
@@ -209,7 +210,7 @@ void RoomManager::viewEventMenu(const QString &eventId, NeoChatRoom *room, const
if (eventHandler.getMediaInfo().contains("mimeType"_ls)) { if (eventHandler.getMediaInfo().contains("mimeType"_ls)) {
Q_EMIT showFileMenu(eventId, Q_EMIT showFileMenu(eventId,
room->member(event.senderId()), new NeochatRoomMember(room, eventId),
eventHandler.messageComponentType(), eventHandler.messageComponentType(),
eventHandler.getPlainBody(), eventHandler.getPlainBody(),
eventHandler.getMediaInfo()["mimeType"_ls].toString(), eventHandler.getMediaInfo()["mimeType"_ls].toString(),
@@ -218,7 +219,7 @@ void RoomManager::viewEventMenu(const QString &eventId, NeoChatRoom *room, const
} }
Q_EMIT showMessageMenu(eventId, Q_EMIT showMessageMenu(eventId,
room->member(event.senderId()), new NeochatRoomMember(room, eventId),
eventHandler.messageComponentType(), eventHandler.messageComponentType(),
eventHandler.getPlainBody(), eventHandler.getPlainBody(),
eventHandler.getRichBody(), eventHandler.getRichBody(),

View File

@@ -23,6 +23,7 @@
#include "models/sortfilterspacelistmodel.h" #include "models/sortfilterspacelistmodel.h"
#include "models/timelinemodel.h" #include "models/timelinemodel.h"
#include "models/userlistmodel.h" #include "models/userlistmodel.h"
#include "neochatroommember.h"
class NeoChatRoom; class NeoChatRoom;
class NeoChatConnection; class NeoChatConnection;
@@ -303,7 +304,7 @@ Q_SIGNALS:
* @brief Request to show a menu for the given event. * @brief Request to show a menu for the given event.
*/ */
void showMessageMenu(const QString &eventId, void showMessageMenu(const QString &eventId,
const Quotient::RoomMember &author, const NeochatRoomMember *author,
MessageComponentType::Type messageComponentType, MessageComponentType::Type messageComponentType,
const QString &plainText, const QString &plainText,
const QString &htmlText, const QString &htmlText,
@@ -313,7 +314,7 @@ Q_SIGNALS:
* @brief Request to show a menu for the given media event. * @brief Request to show a menu for the given media event.
*/ */
void showFileMenu(const QString &eventId, void showFileMenu(const QString &eventId,
const Quotient::RoomMember &author, const NeochatRoomMember *author,
MessageComponentType::Type messageComponentType, MessageComponentType::Type messageComponentType,
const QString &plainText, const QString &plainText,
const QString &mimeType, const QString &mimeType,