aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/QuickMedia.cpp9
-rw-r--r--src/plugins/Matrix.cpp2
2 files changed, 7 insertions, 4 deletions
diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp
index 424ccbb..d3a745f 100644
--- a/src/QuickMedia.cpp
+++ b/src/QuickMedia.cpp
@@ -3211,8 +3211,11 @@ namespace QuickMedia {
message->type = MessageType::REDACTION;
//message->related_event_id.clear();
//message->related_event_type = RelatedEventType::NONE;
- body_item->thumbnail_url = current_room->get_user_avatar_url(message->user);
- body_item->thumbnail_mask_type = ThumbnailMaskType::CIRCLE;
+ Message *original_message = static_cast<Message*>(body_item->userdata);
+ if(original_message) {
+ body_item->thumbnail_url = current_room->get_user_avatar_url(original_message->user);
+ body_item->thumbnail_mask_type = ThumbnailMaskType::CIRCLE;
+ }
body_item->set_description("Message deleted");
body_item->set_description_color(sf::Color::White);
body_item->thumbnail_size = sf::Vector2i(32, 32);
@@ -4231,7 +4234,7 @@ namespace QuickMedia {
// TODO: Show inline notification
show_notification("QuickMedia", "You can't delete a message that hasn't been sent yet");
} else {
- set_body_as_deleted(static_cast<Message*>(selected->userdata), selected);
+ //set_body_as_deleted(static_cast<Message*>(selected->userdata), selected);
void *selected_message = selected->userdata;
post_task_queue.push([this, &current_room, selected_message]() {
ProvisionalMessage provisional_message;
diff --git a/src/plugins/Matrix.cpp b/src/plugins/Matrix.cpp
index 33eb3a4..a7d50d0 100644
--- a/src/plugins/Matrix.cpp
+++ b/src/plugins/Matrix.cpp
@@ -3141,7 +3141,7 @@ namespace QuickMedia {
std::string transaction_id = create_transaction_id();
if(transaction_id.empty())
return PluginResult::ERR;
- my_events_transaction_ids.insert(transaction_id);
+ //my_events_transaction_ids.insert(transaction_id);
Message *message_typed = (Message*)message;