Fix replying and editing stickers

This commit is contained in:
Nicolas Werner 2021-07-19 16:14:09 +02:00
parent 9a950c7f0e
commit 3b56ff2d85
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9

View file

@ -515,6 +515,15 @@ InputBar::sticker(ImagePackModel *model, int row)
sticker.url = img.url; sticker.url = img.url;
sticker.body = img.body; sticker.body = img.body;
if (!room->reply().isEmpty()) {
sticker.relations.relations.push_back(
{mtx::common::RelationType::InReplyTo, room->reply().toStdString()});
}
if (!room->edit().isEmpty()) {
sticker.relations.relations.push_back(
{mtx::common::RelationType::Replace, room->edit().toStdString()});
}
room->sendMessageEvent(sticker, mtx::events::EventType::Sticker); room->sendMessageEvent(sticker, mtx::events::EventType::Sticker);
} }