-
Guus
What is the purpose of `TRAVIS_TAG:-` on the first line below (characters 23 trough 34)? ``` $ export TRAVIS_TAG=${TRAVIS_TAG:-$(date +'%Y%m%d')-TRAVIS_BUILD_NUMBER_$TRAVIS_BUILD_NUMBER-$(git log --format=%h -1)} $ echo $TRAVIS_TAG 20200402-TRAVIS_BUILD_NUMBER_-c74cade ```
-
Guus
It doesn't seem to be included in the exported value?
-
jonas’
Guus, ${foo:-bar} defaults the expression to `bar` if `foo` is not defined
-
jonas’
the `-` is part of the syntax
-
Guus
ah!
-
Guus
then it seems this construct is a mismatched combination of copy/paste
-
jonas’
why?
-
Guus
TRAVIS_TAG is never defined.
-
jonas’
you sure?
-
Guus
well, it shouldn't.
-
jonas’
then I suggest not exporting a variable named like something the CI server could set ;)
-
Guus
or should it... hmm.. wI didn't _expect_ it 🙂
-
lovetox
if i get a disco info request to my full jid
-
lovetox
with a node that resembles entity caps
-
lovetox
should i check if the hash is my current hash
-
lovetox
and if not probably answer with an error or not?
-
lovetox
because 0115 does not mention anything about in what cases one should return an error
-
lovetox
and what error that would be
-
flow
lovetox, smack caches the last N caps and will return the information
-
lovetox
sound wrong to me
-
flow
but maybe I don't get the question. the answer seems trivial to me: if you can answer the query, the answer it, otherwise response with an error
-
flow
lovetox, how come?
-
lovetox
but doesnt answer my question, you assume someone sends a hash that existed in the past
-
flow
ok, then I probably don't understand the question
-
lovetox
i send a disco info request with node="lovetoxlovesdisco"
-
lovetox
what does smacks answer?
-
flow
assuming the node does not exists, hopefully whatever xep30 specifies to return in that case
- flow looks at xep30 (and later at smack's code)
-
flow
https://xmpp.org/extensions/xep-0030.html#errors
-
flow
item-not-found
-
flow
lovetox, does that help?
-
flow
(or, does it sound right?)
-
lovetox
yeah thats what i thought, item-not-found seems to fit
-
lovetox
just find it weird that 115 neither say anything about checking the node hash, nor notes any error cases
-
lovetox
for example Gajim does not check the node hash, and just returns its disco info
-
lovetox
which seems pretty bad
-
flow
indeed
-
flow
tbh, I wouldn't expect that xep115 has to say anthing about this, as its all within the realm of xep30✎ -
flow
tbh, I wouldn't expect that xep115 has to say anything about this, as its all within the realm of xep30 ✏
-
lovetox
do have some kind of node register functionality
-
lovetox
it seems more than one xep uses disco
-
lovetox
like adhoc which can have various nodes
-
lovetox
but its not clear if we receive a disco for what module it is
-
lovetox
entity caps, ad hoc, or something else
-
lovetox
there is no xep namespaces here
-
flow
well it should be clear to the receiving entity if there is something behind that node or not
-
lovetox
yeah but how do you implement that in a library
-
lovetox
you have multiple modules, and they register their nodes in some kind of service
-
flow
hmm? I don't see a problem, smack obviously did
-
lovetox
which routes the iq then to correct module
-
lovetox
im asking you flow
-
lovetox
how you did it
-
flow
you only have an issue if there is a clash in the node name
-
flow
and to prevent those we have https://github.com/xsf/registrar/blob/master/nodes.xml
-
flow
lovetox, smack's entity caps manager tells the service discovery manager to return X on a disco info request to node Y
-
lovetox
ok so modules register their nodes in some kind of service
-
flow
yap
-
lovetox
yeah seems good, sigh, more work, it never ends
-
flow
its similar to how modules can register for IQ requests
-
flow
just in this case, it's limited to a particular IQ and involves nodes (the often unknown and misunderstood concept of XMPP)
-
lovetox
ok thanks :)
-
flow
always happy to help :)