aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2025-06-15 21:13:12 +0200
committerdec05eba <dec05eba@protonmail.com>2025-06-15 21:13:12 +0200
commit3bf44ddaf473ccd8dfc7b5bb268e8ef02c96fd92 (patch)
treef4d13bde5d02bc2e5bcbd058b0b1b2995e470652 /src
parent881f0d1625426f8e0717c1ed578a41ac856be8a6 (diff)
Matrix: improve encrypted text editing
Diffstat (limited to 'src')
-rw-r--r--src/QuickMedia.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp
index 3a2f2f5..d702fc9 100644
--- a/src/QuickMedia.cpp
+++ b/src/QuickMedia.cpp
@@ -7479,6 +7479,10 @@ namespace QuickMedia {
} else {
RoomExtraData &room_extra_data = matrix->get_room_extra_data(current_room);
std::string body_text_unformatted = Text::to_printable_string(selected->get_description());
+ MatrixChatBodyItemData *matrix_chat_body_item = static_cast<MatrixChatBodyItemData*>(selected->extra.get());
+ const char *encrypt_prefix = "🔒 ";
+ if(string_starts_with(body_text_unformatted, encrypt_prefix) && matrix_chat_body_item)
+ body_text_unformatted.replace(0, strlen(encrypt_prefix), "/encrypt ");
chat_state = ChatState::EDITING;
currently_operating_on_item = selected;