aboutsummaryrefslogtreecommitdiff
path: root/xmpp-vala/src/module/message/module.vala
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2019-12-18 18:53:14 +0100
committerfiaxh <git@lightrise.org>2019-12-18 20:35:04 +0100
commitc3532bdf3141bcf0cbf9e4ae7a926dcda4f132ef (patch)
treea6264c95b8cd05ea18abd4c811cdfed46f98d6af /xmpp-vala/src/module/message/module.vala
parent321c3529f3fedbd5eaa9cd619ee408fb683921ca (diff)
downloaddino-c3532bdf3141bcf0cbf9e4ae7a926dcda4f132ef.tar.gz
dino-c3532bdf3141bcf0cbf9e4ae7a926dcda4f132ef.zip
Refactor MAM catchup. Fetch from latest to earliest message.
Diffstat (limited to 'xmpp-vala/src/module/message/module.vala')
-rw-r--r--xmpp-vala/src/module/message/module.vala4
1 files changed, 4 insertions, 0 deletions
diff --git a/xmpp-vala/src/module/message/module.vala b/xmpp-vala/src/module/message/module.vala
index ab3a7d80..5ddbbe1a 100644
--- a/xmpp-vala/src/module/message/module.vala
+++ b/xmpp-vala/src/module/message/module.vala
@@ -12,6 +12,7 @@ namespace Xmpp {
public StanzaListenerHolder<MessageStanza> send_pipeline = new StanzaListenerHolder<MessageStanza>();
public signal void received_message(XmppStream stream, MessageStanza message);
+ public signal void received_message_unprocessed(XmppStream stream, MessageStanza message);
public void send_message(XmppStream stream, MessageStanza message) {
send_pipeline.run.begin(stream, message, (obj, res) => {
@@ -21,6 +22,9 @@ namespace Xmpp {
public async void received_message_stanza_async(XmppStream stream, StanzaNode node) {
MessageStanza message = new MessageStanza.from_stanza(node, stream.get_flag(Bind.Flag.IDENTITY).my_jid);
+
+ received_message_unprocessed(stream, message);
+
if (!message.is_error()) {
bool abort = yield received_pipeline.run(stream, message);
if (abort) return;