Last message correction fixes
This commit is contained in:
parent
d091a6c3cd
commit
5b2683dfa5
|
@ -47,6 +47,9 @@ public class MessageCorrection : StreamInteractionModule, MessageListener {
|
||||||
outstanding_correction_nodes[out_message.stanza_id] = stanza_id;
|
outstanding_correction_nodes[out_message.stanza_id] = stanza_id;
|
||||||
stream_interactor.get_module(MessageStorage.IDENTITY).add_message(out_message, conversation);
|
stream_interactor.get_module(MessageStorage.IDENTITY).add_message(out_message, conversation);
|
||||||
stream_interactor.get_module(MessageProcessor.IDENTITY).send_xmpp_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()
|
db.message_correction.insert()
|
||||||
.value(db.message_correction.message_id, out_message.id)
|
.value(db.message_correction.message_id, out_message.id)
|
||||||
|
|
|
@ -151,6 +151,10 @@ public class ConversationViewController : Object {
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool forward_key_press_to_chat_input(EventKey event) {
|
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
|
// Don't forward / change focus on Control / Alt
|
||||||
if (event.keyval == Gdk.Key.Control_L || event.keyval == Gdk.Key.Control_R ||
|
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) {
|
event.keyval == Gdk.Key.Alt_L || event.keyval == Gdk.Key.Alt_R) {
|
||||||
|
|
|
@ -283,6 +283,9 @@ public class TrustManager {
|
||||||
StanzaNode? _encrypted = stanza.stanza.get_subnode("encrypted", NS_URI);
|
StanzaNode? _encrypted = stanza.stanza.get_subnode("encrypted", NS_URI);
|
||||||
if (_encrypted == null || MessageFlag.get_flag(stanza) != null || stanza.from == null) return false;
|
if (_encrypted == null || MessageFlag.get_flag(stanza) != null || stanza.from == null) return false;
|
||||||
StanzaNode encrypted = (!)_encrypted;
|
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;
|
if (!Plugin.ensure_context()) return false;
|
||||||
int identity_id = db.identity.get_id(conversation.account.id);
|
int identity_id = db.identity.get_id(conversation.account.id);
|
||||||
MessageFlag flag = new MessageFlag();
|
MessageFlag flag = new MessageFlag();
|
||||||
|
|
Loading…
Reference in a new issue