Monday, July 05, 2021
grimoire@muc.metronome.im
July
Mon Tue Wed Thu Fri Sat Sun
      1 2
3
4
5
6 7 8 9 10
11
12 13 14
15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30
31  
             
Metronome IM "cook" book room | Support and Dev talk about the Metronome XMPP server.

Latest stable version build is: 4.0.3

For more information you can visit: https://metronome.im

Room logs can be found here: https://muc.metronome.im/logs/grimoire/

* Links *
<==========================================================>
- Building & Installation:
https://metronome.im/building
- Documentation:
https://metronome.im/documentation
- Issues Tracker:
https://github.com/maranda/metronome/issues
<==========================================================>

[06:25:20] <hippo> Hi all! Just switched from Prosody to Metronome, mainly because of the advanced mod_register functionality
[06:26:15] <hippo> I'm using it for an XMPP-powered card game app, but the problem is, when a client disconnects and then reconnects, they get the same set of messages again. Any idea how to prevent this?
[06:26:29] <hippo> I tried disabling mam and message_carbons, but that didn't help
[06:26:51] <hippo> I'm guessing that Metronome somehow didn't realise the messages had been delivered and tried to send them again?
[06:31:21] <hippo> Basically I don't want Metronome to cache messages if they've been sent out once
[07:55:26] <Maranda (Aria Network)> hippo: get the "same sets of messages", are you using MUCs to power up the game?
[07:56:34] <Maranda (Aria Network)> If you're using multi-user chats, you're probably fetching the room history.
[07:56:57] <hippo> no, i'm using a server-side component which loosely follows the MUC format but isn't actually MUC
[07:57:06] <hippo> it's based on this (draft) XEP: https://xmpp.org/extensions/inbox/multi-user_gaming.html
[07:57:37] <hippo> but perhaps metronome is treating it like an MUC for some reason? didn't think of that before you mentioned it!
[07:57:55] <Maranda (Aria Network)> Is it an internal or an external component?
[07:58:01] <hippo> external
[07:59:04] <Maranda (Aria Network)> Metronome won't do anything in that case that should look like caching messages
[07:59:22] <hippo> By the way, I got it to stop now by disabling stream management, message carbons and MAM as an ad-hoc measure, but I'm not sure why exactly that works
[07:59:35] <Maranda (Aria Network)> it will just route stanza from and to the component
[07:59:44] <Maranda (Aria Network)> it will just route stanzas from and to the component
[08:00:24] <hippo> Wait, but if the component sends a message to an offline user, that message will be delivered when the user comes online right?
[08:00:43] <Maranda (Aria Network)> yes
[08:01:04] <hippo> My guess is that somehow Metronome isn't registering that the message was received (because my frontend client doesn't send any acknowledgement) so it sends it again the next time the client connects
[08:01:05] <Maranda (Aria Network)> what is happening isn't related to MAM though
[08:01:33] <Maranda (Aria Network)> it's more possible that is related to Stream Management if the stanzas aren't acked
[08:02:05] <Maranda (Aria Network)> Are you using a custom client component to powerup the game?
[08:02:05] <hippo> > it's more possible that is related to Stream Management if the stanzas aren't acked
ah yes, that was my guess too 🙂
[08:02:22] <hippo> yes, both the client and component are custom
[08:02:46] <Maranda (Aria Network)> But instead of disabling stream management server side if that's the issue you could avoid enabling it client side
[08:03:08] <hippo> Hmm...let me try that
[08:03:21] <hippo> Or I could just tell my client to acknowledge the messages
[08:03:30] <hippo> That would cause more traffic though
[08:03:46] <hippo> (I'm using xmpp.js by the way)
[08:03:52] <Maranda (Aria Network)> and/or if you enable it, check that stanzas are acked correctly, or on session resumes Metronome does re-send the unacked stanzas to the client which is what you might be perceiving as "the cache"
[08:05:53] <hippo> Hmm okay, that sounds like a likely explanation
[08:06:10] <hippo> I'll try it when I get onto it later today; thanks! 🙂
[08:06:25] <Maranda (Aria Network)> > <@_bifrost_hippo=40projections.lightwitch.org:services.aria-net.org> I'll try it when I get onto it later today; thanks! 🙂

No problem, anytime.
[08:06:33] <Maranda (Aria Network)> 👍️