MartinDISCLAIMER: I am no dev so probably I am holding it wrong anyway.
MartinI am using go and github.com/mattn/go-xmpp
flowMartin, no worries. but you definetly should not settle for quick hacks, especially if they fragile
MartinI did create a struct with the structure of the xml and then xml.Unmarshal the IQ reply into it.
flowthat alone sounds worrysome. due to the extensible nature of XMPP the returned XML may not match your struct✎
pep.Martin, you can easily become a developer if you go into your Android settings and tap on "Build number" multiple times. Then it will say "You are now a developer!"
flowthat alone sounds worrisome. due to the extensible nature of XMPP the returned XML may not match your struct ✏
pep.It's that easy
MartinLooking at the output it seems the max-file-size is in the value of the second field on the first and second x. But if this is not standardized I will check for the "max-file-size" in var while cycling through all.
flowMartin, it *is* standardized
pep.You need to own a device with android, it's the only requirement for being a developer
Martinpep.: Did that several times already on all of my phones. Thanks, no I can not hide behind "I'm no dev" anymore. :(
flowMartin, it is the value of the max-size-field of the extended disco info form with the type urn:xmpp:http:upload:0
MartinOk. So it is important to check the field name. That's what I wanted to know. Thanks. :)
flowMartin, not only the field name, you also have to check that you are looking at the right form
MartinAbout the issue that the struct might not matching if/when something there get's extended I don't know what to do, as somehow I must get the date of that byte array into something I can process.
Martinflow: Meh, why everything must be complicated…
flowI don't think it is complicated, nor that there is a much simpler alternative
flowyou could extra the value with a pull parser
flowor mayben even an xpath expression
MartinHmm, that would be two new things to read up. ^^
flowalways a good idea to learn new things :)
MartinIt's always exponential growth, I want to do one thing than I need look up three things for that. Number 1 requires me to look up 4 other things, number two requires me to look up 2 new things and numer 3 requires me to look up 3 new things. And every level 2 new thing requires me to look up n level 3 new things. It's never ending. I, as an engineer, don't understand how you devs ever finished your studies because everything is a hydra. ^^
flowthe secret is: we are always studying and shaving yaks
MartinYou never shave Ge0rg, his avatar is as hairy as always!
MartinSo, you think this is sufficient for determining the max-file-size or is it still fragile? https://salsa.debian.org/mdosch-guest/go-sendxmpp/-/commit/9702df6c84a189fbf881c29c9ba07d3e77ae84c8
flowMartin, it is far better, but AFAIKT you do not check if you look at the right form
MartinWhat to check for? I don't see anything interesting for FORM: