diff options
-rw-r--r-- | libdino/src/service/counterpart_interaction_manager.vala | 8 | ||||
-rw-r--r-- | xmpp-vala/src/module/xep/0184_message_delivery_receipts.vala | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/libdino/src/service/counterpart_interaction_manager.vala b/libdino/src/service/counterpart_interaction_manager.vala index 5b9d1fff..03eb6c6f 100644 --- a/libdino/src/service/counterpart_interaction_manager.vala +++ b/libdino/src/service/counterpart_interaction_manager.vala @@ -67,8 +67,8 @@ public class CounterpartInteractionManager : StreamInteractionModule, Object { stream_interactor.module_manager.get_module(account, Xep.ChatMarkers.Module.IDENTITY).marker_received.connect( (stream, jid, marker, id, message_stanza) => { on_chat_marker_received.begin(account, jid, marker, id, message_stanza); }); - stream_interactor.module_manager.get_module(account, Xep.MessageDeliveryReceipts.Module.IDENTITY).receipt_received.connect((stream, jid, id) => { - on_receipt_received(account, jid, id); + stream_interactor.module_manager.get_module(account, Xep.MessageDeliveryReceipts.Module.IDENTITY).receipt_received.connect((stream, jid, id, stanza) => { + on_receipt_received(account, jid, id, stanza); }); stream_interactor.module_manager.get_module(account, Xep.ChatStateNotifications.Module.IDENTITY).chat_state_received.connect((stream, jid, state, stanza) => { on_chat_state_received.begin(account, jid, state, stanza); @@ -198,8 +198,8 @@ public class CounterpartInteractionManager : StreamInteractionModule, Object { } } - private void on_receipt_received(Account account, Jid jid, string id) { - Conversation? conversation = stream_interactor.get_module(ConversationManager.IDENTITY).get_conversation(jid, account, Conversation.Type.CHAT); + private void on_receipt_received(Account account, Jid jid, string id, MessageStanza stanza) { + Conversation? conversation = stream_interactor.get_module(ConversationManager.IDENTITY).approx_conversation_for_stanza(stanza.from, stanza.to, account, stanza.type_); if (conversation == null) return; handle_chat_marker(conversation, jid,Xep.ChatMarkers.MARKER_RECEIVED, id); } diff --git a/xmpp-vala/src/module/xep/0184_message_delivery_receipts.vala b/xmpp-vala/src/module/xep/0184_message_delivery_receipts.vala index 7f4f8a03..cee09f22 100644 --- a/xmpp-vala/src/module/xep/0184_message_delivery_receipts.vala +++ b/xmpp-vala/src/module/xep/0184_message_delivery_receipts.vala @@ -4,7 +4,7 @@ namespace Xmpp.Xep.MessageDeliveryReceipts { public class Module : XmppStreamModule { public static ModuleIdentity<Module> IDENTITY = new ModuleIdentity<Module>(NS_URI, "0184_message_delivery_receipts"); - public signal void receipt_received(XmppStream stream, Jid jid, string id); + public signal void receipt_received(XmppStream stream, Jid jid, string id, MessageStanza stanza); private SendPipelineListener send_pipeline_listener = new SendPipelineListener(); @@ -37,7 +37,7 @@ namespace Xmpp.Xep.MessageDeliveryReceipts { private void received_message(XmppStream stream, MessageStanza message) { StanzaNode? received_node = message.stanza.get_subnode("received", NS_URI); if (received_node != null) { - receipt_received(stream, message.from, received_node.get_attribute("id", NS_URI)); + receipt_received(stream, message.from, received_node.get_attribute("id", NS_URI), message); } } } |