Fix forwarding stickers

fixes #1182
This commit is contained in:
Nicolas Werner 2023-02-20 01:18:06 +01:00
parent ac4c9e024e
commit d9dd4a3934
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9

View file

@ -529,11 +529,12 @@ TimelineViewManager::forwardMessageToRoom(mtx::events::collections::TimelineEven
std::visit(
[room](auto e) {
if constexpr (mtx::events::message_content_to_type<decltype(e.content)> ==
mtx::events::EventType::RoomMessage) {
constexpr auto type = mtx::events::message_content_to_type<decltype(e.content)>;
if constexpr (type == mtx::events::EventType::RoomMessage ||
type == mtx::events::EventType::Sticker) {
e.content.relations.relations.clear();
removeReplyFallback(e);
room->sendMessageEvent(e.content, mtx::events::EventType::RoomMessage);
room->sendMessageEvent(e.content, type);
}
},
*e);