Fix forwarding stickers

fixes #1182
v0.11.2-next
Nicolas Werner 2 years ago
parent ac4c9e024e
commit d9dd4a3934
No known key found for this signature in database
GPG Key ID: C8D75E610773F2D9
  1. 7
      src/timeline/TimelineViewManager.cpp

@ -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);

Loading…
Cancel
Save