lovetoxdoes it make sense to try PLAIN on a host from xmpp-client?
lovetoxor does xmpp-client always mean START TLS
MattJPLAIN? The SASL mechanism?
lovetoxno, i mean no TLS
MattJOr do you mean a totally unencrypted connection?
lovetoxunencrypted
MattJIt doesn't make sense to ever try an unencrypted connection
KevIf what SRV resolves to doesn't offer TLS, it's a matter of local policy whether you'll continue without it.
lovetoxtry is the wrong word
lovetoxthe user wants to connect PLAIN, do i resolve xmpp-client and try there
MattJYes
lovetoxor do i just resolve domain
lovetoxand use 5222
MattJYou would still obey SRV
KevYou always use SRV unless the user explicitly asks you not to (if you support such a thing).
lovetoxi wondered because xmpps-client is explicitly for DIRECT TLS
lovetoxso even if the user wants PLAIN, i would never try there
lovetoxi wondererd if xmpp-client is explicitly for START TLS
KevCalling it PLAIN is somewhat misleading. PLAIN is a SASL mechanism.
KevYou mean 'The user asks to never use TLS', I think?
flowlovetox, no, xmpp-client is for the TCP binding of XMPP defined bin RFC6120
lovetoxyes, the user asks to connect unencrypted
lovetoxok good, thats what i wanted to know
lovetoxso i still have to resolve xmpp-client, before i go the domain:5222 fallback route
MattJYes
flowlovetox, that is what is written down in rfc6120 ;)
lovetoxi wondered why did we add websocket and bosh into a TXT record
lovetoxwhy not xmpp-client-websocket._tcp ..
MattJBecause they need URLs
lovetoxah its not allwoed
lovetoxok
lovetoxits bit weird because it doesnt allow for weight and priority
lovetoxbut i guess that would be really an edge case to have more than one websocket connection point
MattJHTTP doesn't
lovetoxah so it always has to be over 80/443
MattJYes
lovetoxthat makes sense then
MattJWe were discussing recently the 20 year-old bug report for Firefox to support SRV for HTTP
MattJWeb folk have no interest in it
lovetoxwriting since quite a time to move all connection/dns logic from gajim into nbxmpp
lovetoxif you want to support, xmpps, xmpp, websocket, unencrypted, proxy for websocket and tcp, setting a custom host (no srv resolution)
lovetoxand the lib should handle that all automatically, does get a bit complicated :D
MattJIndeed
MattJSomeone needs to make a flowchart
flowlovetox, that's exactly what I am also currently dealing with in my not-so-small smack refactor project
lovetoxbut i have the luck of GLib taking most of the dns resolution away from me
lovetoxbecause if i would have to deal with stuff like happy eyeballs etc
lovetoxthen i think it gets a bit crazy :)
asterixhas left
flowI think you probably want happy eyeballs not only on the DNS level, but also on the connection level
lovetoxactually they ever provide methods like connect_to_service() where i just pass "xmpps-client"
flowe.g. initiate TCP connections to the ipv4 and ipv6 endpoints in parallel
lovetoxyes flow GLib does that
lovetoxi incorrectly said DNS resolution, but GLib also does my connection
flownice
asterixhas joined
lovetoxthough i had to implement socks5 proxy myself, because the code is really broken in GLib, but socks5 is really minimal, so not a problem
flownow you may only want to make parallel connect_to_service calls for tcp+tls/direct-tls/websocket/bosh and use the transport whoever finishes first ;)
lovetoxhm no because they are not equivalent
flow(I actually thought about doing that in Smack but decided against it for the moment, only the endpoint discovery runs concurrently)
flowlovetox, I'd argue they are equivalent
lovetoxnot direct tls has fewer roundtrips
lovetoxwebsocket is not as efficient as tcp
flowsure, but why does it matter
lovetoxwhy does efficiency matter?
flowthat's not what I said
lovetoxof course i will try the way with fewest roundtrips first
flowyes, there is a higher overhead in some transports, but isn't it also important to the user that the connection is established fast?
lovetoxalso the chance that xmpps connect is failing although the server admin specified a srv record for it
lovetoxis probably minimal to 0
lovetoxeyeballs for ipv4, and ipv6 was made, because some networks didnt allow for ipv6, and some did, so there was no way to tell at start what will succeed
lovetoxso they race both
flowlovetox, why try the one with the fewest roundstrips first when you could try all concurrently and simple use the one that finishes connecting first?
lovetoxbecause its much more work
lovetoxand almost no benefit
KevIt also possibly depends what you mean by 'connecting'.
lovetoxopening a writeable socket
flowlovetox, right, that's why I decided against it (for now)
KevA server operator probably isn't going to thank you for doing 6* as many TLS negotiations as you need, etc.
flowKev, true, but you could just not do TLS and define "connected" as layer 4 connection (e.g. TCP) established
lovetoxyes only open a socket
lovetoxalso i do not retry with different connection method, if something fails while TLS negotiation or even on xmpp level
lovetoxthen its just failed, im not helping the admin shadowing broken connection points
flowwell retry a different XMPP transport after a TLS negoation failure appears sensible. After all it could be a misconfigured BOSH endpoint while the other endpoint is correctly configured
lovetoxyeah exactly, no it does not make sense to me
KevOr not misconfigured, but a local transparent proxy is breaking HTTP.
lovetoxthis way the point will never get fixed
flowlovetox, I usually follow that argumentation, but it's the job of a client library to establish a connection whenever possible
flowaborting the connection attempt seems even for me a little bit to harsh
lovetoxi think we have to disagree here
flowof course we have
lovetoxand i think you never implement this right?
flowdefine "this" pls
lovetoxretry different connection method if tls or xmpplevel fails
flowI was explicitly only talking about TLS negotiation
flowNo, since Smack past and current design does iterate over different transports. It's only the new design that allows for modular transports to be used for the same connection, so I was not able to implement it in the past
bhaveshsguptahas left
lovetoxyeah retry on error on xmpp level is just wrong for me
lovetoxand TLS .. maybe
lovetoxbut think its tricky, would have to find out what TLS errors are errors where i want to try different
lovetoxcert error for example definitly not
flowI'd thought especially cert errors
lovetoxand really do i want to connect desperatly to a server , where the admin didnt set up TLS correctly
lovetoxi dont know
kikuchiyohas joined
pulkomandyhas left
flow*does *not* iterate
pulkomandyhas joined
sonnyhas left
sonnyhas joined
kikuchiyohas left
debaclehas joined
sonnyhas left
bhaveshsguptahas joined
sonnyhas joined
lovetoxyeah i need to implement also POSH
lovetoxi forgot about that one
pulkomandyhas left
pulkomandyhas joined
asterixhas left
bhaveshsguptahas left
pulkomandyhas left
pulkomandyhas joined
lovetoxhas left
larmahas left
larmahas joined
debaclehas left
lovetoxhas joined
bhaveshsguptahas joined
debaclehas joined
sonnyhas left
Wojtekhas joined
sonnyhas joined
kikuchiyohas joined
asterixhas joined
sonnyhas left
bhaveshsguptahas left
lovetoxhas left
asterixhas left
asterixhas joined
bhaveshsguptahas joined
Taohas joined
bhaveshsguptahas left
bhaveshsguptahas joined
Taohas left
pulkomandyhas left
pulkomandyhas joined
Taohas joined
Taohas left
pulkomandyhas left
pulkomandyhas joined
sonnyhas joined
asterixhas left
asterixhas joined
lovetoxhas joined
asterixhas left
asterixhas joined
asterixhas left
asterixhas joined
asterixhas left
asterixhas joined
asterixhas left
asterixhas joined
asterixhas left
asterixhas joined
pulkomandyhas left
pulkomandyhas joined
pulkomandyhas left
pulkomandyhas joined
asterixhas left
asterixhas joined
pulkomandyhas left
pulkomandyhas joined
asterixhas left
asterixhas joined
serge90has left
serge90has joined
pulkomandyhas left
pulkomandyhas joined
bhaveshsguptahas left
pulkomandyhas left
bhaveshsguptahas joined
pulkomandyhas joined
bhaveshsguptahas left
bhaveshsguptahas joined
asterixhas left
asterixhas joined
bhaveshsguptahas left
bhaveshsguptahas joined
pulkomandyhas left
pulkomandyhas joined
strarhas left
sonnyhas left
sonnyhas joined
sonnyhas left
pulkomandyhas left
pulkomandyhas joined
asterixhas left
asterixhas joined
sonnyhas joined
bhaveshsguptahas left
Zashhas left
Zashhas joined
bhaveshsguptahas joined
lovetoxhas left
lovetoxhas joined
strarhas joined
asterixhas left
asterixhas joined
wurstsalathas left
wurstsalathas joined
sonnyhas left
asterixhas left
asterixhas joined
bhaveshsguptahas left
leosbrfhas joined
bhaveshsguptahas joined
lovetoxhas left
lovetoxhas joined
bhaveshsguptahas left
leosbrfHello all, I'm trying to implement a "reply to" requirement. I use an ejabberd server. Can anyone point me directions on how I can implement this? I know about Threads (xep-0201), but the problem is that I need to get the parent message from the server and I didn't find a way to query for specific messages (I don't have all the message history, because I'm paging it)
sonnyhas joined
leosbrf.
MattJ,
strarhas left
bhaveshsguptahas joined
strarhas joined
MattJYou mean that you have a message, it says it is "in reply to message XYZ" and you need to find message XYZ?
leosbrfyes
leosbrfI also could make a query starting from 'message XYZ' and returning all other messages after it
asterixhas left
asterixhas joined
leosbrfbut the xmpp specs only gives me three fields: with, start, end
MattJYeah, the current version of the XEP doesn't really support this use-case
Zashhack: ask for one message and set rsm 'before' to the one you want and 'max=1', then request the message after the one you get.
MattJHa
MattJBut no, that's a terrible solution :)
bhaveshsguptahas left
bhaveshsguptahas joined
leosbrfZash , I tried that solution, but I would have to send a start/end filter. But the stanza only gives me an id which I believe is a unix timestamp. Still, I could not convert it to a proper datetime string accepted by the form_type. It gives me a NAN error 🤔
ZashYou shouldn't assume anything about archive ids, they're opaque strings.
ZashAs for ejabberd requiring all three MAM form fields, that's just weird.
lovetoxit does not
ZashLooks like it to me
lovetoxmaybe we talk about different things
bhaveshsguptahas left
lovetoxbut its impossible, the prime uscase and example in MAM is querying the archive without any formfield set
lovetoxand im pretty sure i never did set all 3 formfields ever
ZashEvery time I try that with an ejabberd, I get an error back.
lovetoxand MAM works fine
ZashMUC-MAM tho
lovetoxwhy would that be different
ZashDon't ask me
lovetoxhas left
lovetoxhas joined
leosbrfin ejabberd (my settings) you could pass zero or more of the following fields:
<field var="with" type="jid-single" label="User JID" />
<field var="start" type="text-single" label="Search from the date" />
<field var="end" type="text-single" label="Search until the date" />
<field var="withtext" type="text-single" label="Search the text" />
lovetoxplease show the xml of your query
bhaveshsguptahas joined
leosbrfsure, one sec
Zash<iq id='2' type='set' to='kuketzblog@rooms.dismail.de'><query queryid='f850e845-ce9e-4fd1-875d-206c6394ddbe' xmlns='urn:xmpp:mam:2'><x type='submit' xmlns='jabber:x:data'><field type='hidden' var='FORM_TYPE'><value>urn:xmpp:mam:2</value></field><field type='jid-single' var='with'/><field type='text-single' var='start'/><field type='text-single' var='end'/></x><set xmlns='http://jabber.org/protocol/rsm'/></query></iq>
<iq type='error' from='kuketzblog@rooms.dismail.de' id='2' xml:lang='sv'><query queryid='f850e845-ce9e-4fd1-875d-206c6394ddbe' xmlns='urn:xmpp:mam:2'><set xmlns='http://jabber.org/protocol/rsm'/><x xmlns='jabber:x:data' type='submit'><field type='hidden' var='FORM_TYPE'><value>urn:xmpp:mam:2</value></field><field type='jid-single' var='with'/><field type='text-single' var='start'/><field type='text-single' var='end'/></x></query><error type='modify' code='400'><bad-request xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/><text xmlns='urn:ietf:params:xml:ns:xmpp-stanzas' xml:lang='en'>Bad value of field 'with' of type 'urn:xmpp:mam:1'</text></error></iq>
lovetoxbtw what xep do you want to implement here that needs that?
leosbrfI stuck in getting that id. Because when I request the room history, the stanzas returned have this format:
<message xmlns="jabber:client" to="admin@localhost/3247206387247491563010" from="some_room@conference.localhost">
<result xmlns="urn:xmpp:mam:2" id="1578509255305907">
<forwarded xmlns="urn:xmpp:forward:0">
<message xmlns="jabber:client" xml:lang="en" from="some_room@conference.localhost/leo1" type="groupchat">
<x xmlns="http://jabber.org/protocol/muc#user">
<item jid="leo1@localhost/107114335247801189862018" />
</x>
<archived xmlns="urn:xmpp:mam:tmp" by="some_room@conference.localhost" id="1578509255305907" />
<stanza-id xmlns="urn:xmpp:sid:0" by="some_room@conference.localhost" id="1578509255305907" />
<urls />
<body>someone send a message</body>
</message>
<delay xmlns="urn:xmpp:delay" from="conference.localhost" stamp="2020-01-08T18:47:35.305907Z" />
</forwarded>
</result>
</message>
lovetoxwhat xep you want to implement?
lovetoxwhat is "reply to"
pulkomandyhas left
pulkomandyhas joined
goffihas joined
sonnyhas left
Zashhas left
Zashhas joined
Zashhas left
Zashhas joined
leosbrfwhat is "reply to"?
that is a similar functionality that whatsapp provides (you click a message and click reply). The way I implement, I would store the message id in the child message
leosbrflovetox 👆
lovetoxso not a XEP
lovetoxyou doing your own thing
lovetoxyeah attaching something to a message is a big discussion right now, and its currently not possible
lovetoxbecause MAM is not adapted to that usecase
asterixhas left
asterixhas joined
sonnyhas joined
leosbrfhmm, so that is the reason why I spent some hours researching and found none implementation..hehe . But something you said before gave me directions. In this example:
<after>09af3-cc343-b409f</after>.
Is this code something dynamically generated for the current query request?
sonnyhas left
ajhas joined
lovetoxhas left
sonnyhas joined
ajhas left
debaclehas left
sonnyhas left
asterixhas left
asterixhas joined
bhaveshsguptahas left
sonnyhas joined
asterixhas left
asterixhas joined
asterixhas left
asterixhas joined
sonnyhas left
asterixhas left
asterixhas joined
Wojtekhas left
Wojtekhas joined
Wojtekhas left
asterixhas left
asterixhas joined
asterixhas left
asterixhas joined
pulkomandyhas left
asterixhas left
asterixhas joined
asterixhas left
asterixhas joined
sonnyhas joined
asterixhas left
asterixhas joined
sonnyhas left
sonnyhas joined
Meta Bergmanhas left
Meta Bergmanhas joined
debaclehas joined
leosbrf@lovetox , Anyway, thank you for the information provided