-
Martin
WTH.
- Martin just answered a "new" mail from juser and realized later that it was from december 2020.
-
Martin
Is the date setting on the sending site wrong or did juser take almost one year to deliver that message?
-
Martin
https://mail.jabber.org/pipermail/juser/2020-December/007186.html
-
defanor
FWIW, "Received" headers usually contain timestamps, so you may be able to track when it went where, according to the servers adding those headers, and compare to user-set "Date".
-
defanor
I happened to receive a reply to a message from April just yesterday, maybe it's the delayed message delivery day.
-
Zash
Perhaps it was triggered by the configuration change mentioned in https://mail.jabber.org/pipermail/council/2021-November/004520.html
-
Martin
> Received: from NAM12-DM6-obe.outbound.protection.outlook.com > (mail-dm6nam12olkn2074.outbound.protection.outlook.com [40.92.22.74]) > by atlas.jabber.org (Postfix) with ESMTPS id BBAF089D > for <juser@jabber.org>; Tue, 29 Dec 2020 19:15:31 +0000 (UTC)
-
lovetox
i find it really ugly
-
lovetox
that resource binding is done via IQ
-
Zash
YES
-
lovetox
why though, i mean there was probably a history or story behind this
-
Zash
Welcome to the sensible camp! Let's give angry stares to those who think everything in session startup should be iq stanzas 😉
-
Zash
lovetox, behold this horror: https://xmpp.org/extensions/xep-0078.html
-
Zash
I remember doing that with telnet 900 years ago
-
lovetox
but it makes no sense, reading the rfc, its only nonzas all the way, and then suddenly they start with stanzas BEFORE WE HAVE A JID :D
-
Zash
I think "nonzas" were invented at the time of IETF standardization
-
lovetox
title is enough for me, to not read that
-
Zash
Scroll down to https://xmpp.org/extensions/xep-0078.html#example-3 and cry
-
Zash
Tho it was easier to type that into telnet than doing SCRAM in your head 😉
-
Zash
or even PLAIN
-
Zash
lovetox, do you have a moment to talk about our lord and savior, https://xmpp.org/extensions/xep-0386.html ? ;)
-
Zash
and https://xmpp.org/extensions/xep-0388.html
-
Zash
and https://xmpp.org/extensions/xep-0389.html
-
Zash
the holy trinity of XMPP 2.0 connection establishing
-
lovetox
yes, im interested in that, is there some working support in prosody for that?
-
Zash
I had a prototype / WIP somewhere
-
Zash
Hopefully there'll be more time to work on that after Prosody 0.12 gets out the door.
-
lovetox
also something very ugly
-
lovetox
every stanza has a type attribute with a value
-
lovetox
except presence, it can just be absent
-
Zash
message too
-
Zash
only iq is strict
-
lovetox
no with message its just an optimization
-
lovetox
you can leave it out but that means "normal"
-
lovetox
for presence there is no default
-
Zash
Only having to send `<presence/>` to go online is nice tho.
-
lovetox
makes writing stanza handlers fun, now you need to add code for the single case, where you want to match on the absence of an attribute
-
lovetox
Zash, no problem with that, just assign a default like with message
-
lovetox
presence type=normal
-
lovetox
or something
-
Zash
how about 'available' to mirror 'unavailable' ?
-
Zash
and then hide that in abstractions so it serializes out to None or whathaveyou
-
jonas’
enums! :)
-
lovetox
actually i do that, with show
-
jonas’
and that broke everything?
-
Zash
boolean?
-
lovetox
no works quite well
-
lovetox
i simply have a added, Show.AVAILABLE
-
lovetox
but yeah this is the next ugly thing with presence
-
lovetox
you commnicate your state with show
-
lovetox
but not if you are available
-
lovetox
then its absent
-
lovetox
now you need everytime to check 2 things, actually type must be absent AND show must be absent
-
lovetox
and no problem with optimizations on the stream with default values etc
-
lovetox
but to have nothing, puts library developers in the situation to add stuff thats not in the standard to make things sane
-
Zash
Abstractions gonna abstract
-
lovetox
i really just wonder, that rfc was written over some weeks or months whatever, some inital idea and it was like Presence: Ok most things can be absent, we dont need defaults, just the absence is enough IQ: Nothing is allowed to be absent Message: Lets allow something to be absent, but we define a default
-
Zash
The initial RFCs were written years after Jabber was already a thing
-
lovetox
ok so this was like some thing that needed to be backwards compatible from the start
-
lovetox
?
-
Zash
Jabber was launched in 1999, the IETF standardization happened around 2002-2005 I think (I wasn't involved in any of this back then)
-
Zash
Historical Reasons, yes 🙂
-
lovetox
i found something debatable
-
lovetox
prosody answers a bind request with
-
lovetox
<iq type='result' id='myid'><bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'><jid>lovetox@jabber.fr/test</jid></bind></iq>
-
lovetox
no from on the jid would mean this iq is from the user account✎ -
lovetox
no from on the stanza would mean this iq is from the user account ✏
-
Zash
I've found it safest for my own sanity to not think of those as actual iq stanzas
-
lovetox
should it not be instead from the server? so from=jabber.fr
-
Zash
Instead, pretend that's a nonza that just happens to be called <iq xmlns="jabber:client">
-
Zash
to and from are only allowed on real stanzas
-
Zash
before you've bound a resource, those don't even make sense
-
Zash
Prosody even treats it as a nonza
-
lovetox
rfc does also not include a from in its example for bind
-
Zash
Oh, there it is
-
Zash
https://modules.prosody.im/mod_sasl2.html
-
lovetox
it gets more funny if you consider error cases while binding
-
lovetox
in iq errors the original query is not mandatory included
-
lovetox
then you dont even have the bind namespace
-
lovetox
but i guess the iq stanza id ..
-
jonas’
also there can be no other stanza in flight at that point
-
lovetox
i hate to break the promise to the application that every iq has a from address
-
jonas’
then don't
-
lovetox
only because of this one case ...
-
jonas’
treat it as a nonza
-
lovetox
thats hard
-
lovetox
then i need to make an exception at the parser level
-
lovetox
but i guess i could do this
-
lovetox
so it does not end up as a type IQ
-
Zash
in prosody nothing is a stanza until after resource binding
-
Zash
tho that's handled above the parser, nearer the routing
-
lovetox
right now the parser translates parsed elements based on tag and namespace to respective classes
-
lovetox
and later i dispatch depending on the type
-
lovetox
jonas’, i dont know how much you have typed your lib, but such things are not just a problem because you have to create some exception in your code somewhere
-
lovetox
its your IQ object now returns on get_from() suddenly None or JID
-
jonas’
lovetox, I register the stream-level elements dynamically
-
jonas’
that's why it's not a problem
-
lovetox
which is incredibly ugly for applications
-
lovetox
becuse they now get lots of typing errors, if they dont always check for None
-
jonas’
and from gets rewritten early in the code which knows about stanzas
-
jonas’
to be consistent
-
lovetox
ok i will try to make it into a weird iq nonza :D
-
lovetox
lets see how that works out
-
Zash
okay, I made an https://modules.prosody.im/mod_bind2.html to go with https://modules.prosody.im/mod_sasl2.html
-
Zash
... consisting to 80% of TODOs 🙂
-
thomaslewis
Does it at least function semi-properly?
-
Zash
thomaslewis, you tell me!
-
thomaslewis
ejabberd here, so...
- thomaslewis needs to get back to writing IdleRPG for XMPP at some point...