summary refs log tree commit diff
path: root/src/DeviceVerificationFlow.h
diff options
context:
space:
mode:
authorDeepBlueV7.X <nicolas.werner@hotmail.de>2021-02-10 14:12:49 +0100
committerGitHub <noreply@github.com>2021-02-10 14:12:49 +0100
commit4a5b5f992df713a6031f933d068436cf4e64513b (patch)
tree498c85cc1c5af39392ce8978e3a583384a10e3c9 /src/DeviceVerificationFlow.h
parentFix wrong font used in emoji escape (diff)
parentAbort -> Cancel (diff)
downloadnheko-4a5b5f992df713a6031f933d068436cf4e64513b.tar.xz
Merge pull request #420 from Nheko-Reborn/render-edits
Switch to new relations format and show edits
Diffstat (limited to 'src/DeviceVerificationFlow.h')
-rw-r--r--src/DeviceVerificationFlow.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/DeviceVerificationFlow.h b/src/DeviceVerificationFlow.h

index 34b78962..6c613545 100644 --- a/src/DeviceVerificationFlow.h +++ b/src/DeviceVerificationFlow.h
@@ -206,7 +206,7 @@ private: std::vector<int> sasList; UserKeyCache their_keys; TimelineModel *model_; - mtx::common::RelatesTo relation; + mtx::common::Relation relation; State state_ = PromptStartVerification; Error error_ = UnknownMethod; @@ -230,8 +230,12 @@ private: static_cast<int>(err->status_code)); }); } else if (this->type == DeviceVerificationFlow::Type::RoomMsg && model_) { - if constexpr (!std::is_same_v<T, mtx::events::msg::KeyVerificationRequest>) - msg.relates_to = this->relation; + if constexpr (!std::is_same_v<T, + mtx::events::msg::KeyVerificationRequest>) { + msg.relations.relations.push_back(this->relation); + // Set synthesized to surpress the nheko relation extensions + msg.relations.synthesized = true; + } (model_)->sendMessageEvent(msg, mtx::events::to_device_content_to_type<T>); }