diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2021-07-19 16:14:09 +0200 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2021-07-19 16:14:09 +0200 |
commit | 3b56ff2d85e607b2620ced0f45bdc2c6ef100feb (patch) | |
tree | d569bd8137f20bda3ce5aea2a7d5bde7f7979fcf /src/timeline | |
parent | Merge pull request #648 from Nheko-Reborn/stickers2 (diff) | |
download | nheko-3b56ff2d85e607b2620ced0f45bdc2c6ef100feb.tar.xz |
Fix replying and editing stickers
Diffstat (limited to 'src/timeline')
-rw-r--r-- | src/timeline/InputBar.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/timeline/InputBar.cpp b/src/timeline/InputBar.cpp index 0f210722..56d0d1ce 100644 --- a/src/timeline/InputBar.cpp +++ b/src/timeline/InputBar.cpp @@ -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); } |