From 74f7fa897f9aec298eeadcfc7a7b971f06498858 Mon Sep 17 00:00:00 2001 From: fiaxh Date: Sun, 28 Jun 2020 15:53:41 +0200 Subject: Add queue and resending to stream management --- libdino/src/entity/message.vala | 3 ++- libdino/src/service/message_processor.vala | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'libdino') diff --git a/libdino/src/entity/message.vala b/libdino/src/entity/message.vala index 89ad241a..6670ec5d 100644 --- a/libdino/src/entity/message.vala +++ b/libdino/src/entity/message.vala @@ -14,7 +14,8 @@ public class Message : Object { READ, ACKNOWLEDGED, UNSENT, - WONTSEND + WONTSEND, + SENT } public enum Type { diff --git a/libdino/src/service/message_processor.vala b/libdino/src/service/message_processor.vala index 74192e16..6c415deb 100644 --- a/libdino/src/service/message_processor.vala +++ b/libdino/src/service/message_processor.vala @@ -638,6 +638,9 @@ public class MessageProcessor : StreamInteractionModule, Object { stream.get_module(MessageModule.IDENTITY).send_message.begin(stream, new_message, (_, res) => { try { stream.get_module(MessageModule.IDENTITY).send_message.end(res); + if (message.marked == Message.Marked.NONE/* && (yield stream.get_module(Xep.ServiceDiscovery.Module.IDENTITY).has_entity_feature(stream, conversation.account.bare_jid, Xep.UniqueStableStanzaIDs.NS_URI))*/) { + message.marked = Message.Marked.SENT; + } // The server might not have given us the resource we asked for. In that case, store the actual resource the message was sent with. Relevant for deduplication. Jid? current_own_jid = stream.get_flag(Bind.Flag.IDENTITY).my_jid; -- cgit v1.2.3-70-g09d2