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
1 changed files with 9 additions and 0 deletions

View File

@ -515,6 +515,15 @@ InputBar::sticker(ImagePackModel *model, int row)
sticker.url = img.url;
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);
}