Pass NeochatRoomMembers rather than RoomMembers to menus
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
#include "neochatconfig.h"
|
||||
#include "neochatconnection.h"
|
||||
#include "neochatroom.h"
|
||||
#include "neochatroommember.h"
|
||||
#include "spacehierarchycache.h"
|
||||
#include "urlhelper.h"
|
||||
|
||||
@@ -209,7 +210,7 @@ void RoomManager::viewEventMenu(const QString &eventId, NeoChatRoom *room, const
|
||||
|
||||
if (eventHandler.getMediaInfo().contains("mimeType"_ls)) {
|
||||
Q_EMIT showFileMenu(eventId,
|
||||
room->member(event.senderId()),
|
||||
new NeochatRoomMember(room, eventId),
|
||||
eventHandler.messageComponentType(),
|
||||
eventHandler.getPlainBody(),
|
||||
eventHandler.getMediaInfo()["mimeType"_ls].toString(),
|
||||
@@ -218,7 +219,7 @@ void RoomManager::viewEventMenu(const QString &eventId, NeoChatRoom *room, const
|
||||
}
|
||||
|
||||
Q_EMIT showMessageMenu(eventId,
|
||||
room->member(event.senderId()),
|
||||
new NeochatRoomMember(room, eventId),
|
||||
eventHandler.messageComponentType(),
|
||||
eventHandler.getPlainBody(),
|
||||
eventHandler.getRichBody(),
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "models/sortfilterspacelistmodel.h"
|
||||
#include "models/timelinemodel.h"
|
||||
#include "models/userlistmodel.h"
|
||||
#include "neochatroommember.h"
|
||||
|
||||
class NeoChatRoom;
|
||||
class NeoChatConnection;
|
||||
@@ -303,7 +304,7 @@ Q_SIGNALS:
|
||||
* @brief Request to show a menu for the given event.
|
||||
*/
|
||||
void showMessageMenu(const QString &eventId,
|
||||
const Quotient::RoomMember &author,
|
||||
const NeochatRoomMember *author,
|
||||
MessageComponentType::Type messageComponentType,
|
||||
const QString &plainText,
|
||||
const QString &htmlText,
|
||||
@@ -313,7 +314,7 @@ Q_SIGNALS:
|
||||
* @brief Request to show a menu for the given media event.
|
||||
*/
|
||||
void showFileMenu(const QString &eventId,
|
||||
const Quotient::RoomMember &author,
|
||||
const NeochatRoomMember *author,
|
||||
MessageComponentType::Type messageComponentType,
|
||||
const QString &plainText,
|
||||
const QString &mimeType,
|
||||
|
||||
Reference in New Issue
Block a user