Conversation
|
Woops sorry I missed this one, it looks fine to me. |
No worries, I was thinking about this more and thought that (XMPP) targets can include slashes on them no? like It would make it more tricky to have an
The way you have it now, you're dropping the initial slash ( Or am in interpreting this wrong? Would you be able to just throw some advance/basic topics at me one my pass in? |
|
A JID (Jabber ID, or XMPP address nowadays since “Jabber” is less used) can indeed contain a slash followed with a string we call a resource, in which case it becomes what we call a full JID (the opposite is a bare JID). It is meant as an internal routing detail of the protocol, to address a particular running client. Nowadays, with Message Carbons and Message Archive Management being ubiquitous, all clients of a user (even non-connected ones) will eventually see the same messages, so it doesn’t really make sense any more to expose this detail to users. It is pretty much considered a UX bug to do so as the resource can be a very technical-looking string which can scare less-technical users, and doesn’t bring anything to them. For this reason, I’d say it’s best to consider JIDs as always being bare JIDs, of the form username@domain, and to repurpose the slash however you want. And as always, feel free to ask me anything about the protocols, I really enjoy talking about them! |
|
Thank you for your fast response. I can re-open this ticket and perform the merge if you want. It would definitely allow Apprise to handle: I don't have an XMPP endpoint to test against, but if you wouldn't mind just doing the following for me, i'd relaly really appreciate it: # Create a virtual environment to work in
# This way you can just destroy it after when it's all over.
# The below will create a directory called apprise
python3 -m venv apprise
# Change into our new directory
cd apprise
# Activate our virtual environment
source bin/activate
# Install the branch
pip install git+https://github.com/caronc/apprise.git@455-xmpp-slash-prefix-fix
# Give it a go:
# JID 1 and JID2 can be the same (you'll just get 2 notifications if it all works as expected anyway):
apprise -vv -b "test" \
"xmpp://server.details/JID1/JID2" |
Description:
Related issue (if applicable): #455
This is a follow up to Merge request #485 (thanks so much to @linkmauve).
This slight update addresses just one small comment found post-code-review.
It should properly prevent any XMPP targets from starting with a
/(slash)Checklist
flake8)