Pass NeochatRoomMembers rather than RoomMembers to menus
This commit is contained in:
@@ -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(),
|
||||||
|
|||||||
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user