aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libdino/src/service/message_correction.vala3
-rw-r--r--main/src/ui/conversation_view_controller.vala4
-rw-r--r--plugins/omemo/src/logic/trust_manager.vala3
3 files changed, 10 insertions, 0 deletions
diff --git a/libdino/src/service/message_correction.vala b/libdino/src/service/message_correction.vala
index 90d0580f..e38fd251 100644
--- a/libdino/src/service/message_correction.vala
+++ b/libdino/src/service/message_correction.vala
@@ -47,6 +47,9 @@ public class MessageCorrection : StreamInteractionModule, MessageListener {
outstanding_correction_nodes[out_message.stanza_id] = stanza_id;
stream_interactor.get_module(MessageStorage.IDENTITY).add_message(out_message, conversation);
stream_interactor.get_module(MessageProcessor.IDENTITY).send_xmpp_message(out_message, conversation);
+ if (conversation.read_up_to != null && conversation.read_up_to.equals(old_message)) { // TODO nicer
+ conversation.read_up_to = out_message;
+ }
db.message_correction.insert()
.value(db.message_correction.message_id, out_message.id)
diff --git a/main/src/ui/conversation_view_controller.vala b/main/src/ui/conversation_view_controller.vala
index 31c7e612..dce9920e 100644
--- a/main/src/ui/conversation_view_controller.vala
+++ b/main/src/ui/conversation_view_controller.vala
@@ -151,6 +151,10 @@ public class ConversationViewController : Object {
}
private bool forward_key_press_to_chat_input(EventKey event) {
+ if (((Gtk.Window)view.get_toplevel()).get_focus() is TextView) {
+ return false;
+ }
+
// Don't forward / change focus on Control / Alt
if (event.keyval == Gdk.Key.Control_L || event.keyval == Gdk.Key.Control_R ||
event.keyval == Gdk.Key.Alt_L || event.keyval == Gdk.Key.Alt_R) {
diff --git a/plugins/omemo/src/logic/trust_manager.vala b/plugins/omemo/src/logic/trust_manager.vala
index 1e77fcdd..50c9bbcb 100644
--- a/plugins/omemo/src/logic/trust_manager.vala
+++ b/plugins/omemo/src/logic/trust_manager.vala
@@ -283,6 +283,9 @@ public class TrustManager {
StanzaNode? _encrypted = stanza.stanza.get_subnode("encrypted", NS_URI);
if (_encrypted == null || MessageFlag.get_flag(stanza) != null || stanza.from == null) return false;
StanzaNode encrypted = (!)_encrypted;
+ if (message.body == null && Xep.ExplicitEncryption.get_encryption_tag(stanza) == NS_URI) {
+ message.body = "[This message is OMEMO encrypted]"; // TODO temporary
+ };
if (!Plugin.ensure_context()) return false;
int identity_id = db.identity.get_id(conversation.account.id);
MessageFlag flag = new MessageFlag();