Last message correction fixes

This commit is contained in:
fiaxh 2020-04-06 15:33:43 +02:00
parent d091a6c3cd
commit 5b2683dfa5
3 changed files with 10 additions and 0 deletions

View File

@ -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)

View File

@ -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) {

View File

@ -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();