-
edhelas
do you guys have some script to cleanup old presences in your clients ?
-
jonas’
what does that mean?
-
edhelas
or is there some rule that exists to explain that
-
jonas’
what are old presences?
-
edhelas
what is happening if you have a client that receives a presence and nothing else for days but stays connected
-
jonas’
nothing?
-
edhelas
nothing else from the other jid
-
edhelas
let me rephrase that
-
jonas’
why is that a problem?
-
edhelas
well after 5 days you can maybe think that somehow those presences are not valid anymore
-
jonas’
how could that be?
-
edhelas
well, regarding by your questions I have a feeling that it's not a problem :p
-
Ge0rG
edhelas: it's only a problem if you have significant loss on your s2s links
-
Holger
It may well be a 24/7 (mobile/terminal/whatever) client that manages to keep the session alive, of course. But yes it may also be borked s2s. Who cares about presence anyway :-)
-
jonas’
edhelas, as a client, you can’t do a lot, except cycling your session :)
-
Ge0rG
I care about presents!
-
jonas’
a server can send type="probe" presence stanzas to refresh
-
edhelas
i'm just seing some old presences in the movim db after a few days, and i was wondering that, might be a bug
-
Ge0rG
I'm logged into my server for 9 days now
-
Ge0rG
which coincidentally is the uptime of the server
-
edhelas
this causes issues with https://xmpp.org/extensions/xep-0319.html
-
Zash
Related https://issues.prosody.im/904
-
Zash
jonas’: But then you likely get only the new presence. Stale presence where the unavailable got lost would not get an unavailable unless you count one for the entire account.
-
Zash
I'm not so sure about 319. I've seen almost flood amounts of presence where 319 is the only diff.
-
jonas’
Zash, huh?
-
jonas’
type="probe" SHOULD be answered with unavailable if the peer is offline
-
jonas’
and an unavailable from the bare JID should count for all resources, in general, shouldn’t it?
-
Zash
Yes
-
Zash
But if you have another resource online
-
jonas’
ahhh
-
Zash
One that is different from what you think is online
-
jonas’
and there is no "end" marker...
-
Zash
That's where it gets tricky and you'll need some smart tracking / caching magic
-
jonas’
yeah
-
jonas’
I can come up with some, you can probably too.
-
Zash
Sure.
-
Zash
Doesn't strike me as an urgent enough problem tho, not when it'll have a memory cost.
-
eta
wait clients can't send probes?
-
jonas’
nope
-
jonas’
https://tools.ietf.org/html/rfc6121#section-4.3
-
jonas’
Presence probes SHOULD NOT be sent by a client, because in general a client will not need to send them since the task of gathering presence from a user's contacts is managed by the user's server. However, if a user's client generates an outbound presence probe then the user's server SHOULD route the probe (if the contact is at another server) or process the probe (if the contact is at the same server) and MUST NOT use its receipt of the presence probe from a connected client as the sole cause for returning a stanza or stream error to the client.
-
jonas’
well clients SHOULD NOT send probes
-
eta
so you can!
-
eta
I thought Dino did
-
jonas’
why would you tho
-
eta
iunno
-
Zash
Perhaps of interest / relevance: https://xmpp.org/extensions/xep-0310.html
-
Zash
Tho still needs server-side caching/tracking of remote presence
-
Zash
Altho, synthesizing an annotated unavailable bare-jid presence on (detected) s2s failure could work, and then you queue probes for when s2s comes back.
-
lovetox
there are cases when you want to presence probe
-
lovetox
although not very relevant ones
-
lovetox
for example if you use privacy lists
-
lovetox
when you remove some blocking presence rule, then you have to presence probe
-
lovetox
i dont think a server does that for you
-
lovetox
it does though in blocking command xep which is nice