Skip to content

XMPP support restored using Slixmpp#1505

Merged
caronc merged 11 commits intomasterfrom
497-xmpp-support
Feb 6, 2026
Merged

XMPP support restored using Slixmpp#1505
caronc merged 11 commits intomasterfrom
497-xmpp-support

Conversation

@caronc
Copy link
Owner

@caronc caronc commented Feb 3, 2026

Description

Related issue (if applicable): #497

This PR restores XMPP notification support to Apprise using slixmpp with a modernized implementation.

XMPP Notifications

Send notifications to XMPP users (JIDs). Each notification establishes a temporary connection, sends the message, and cleanly disconnects.

Account Setup

  1. Ensure you have an XMPP account (JID) and password.
  2. Identify your XMPP server hostname and port.
  3. Decide whether TLS certificate verification should be enforced.

Syntax

Valid syntax is as follows:

  • xmpp://{user}:{password}@{host}/
  • xmpps://{user}:{password}@{host}:{port}/
  • xmpp://{user}:{password}@{host}/{target}
  • xmpps://{user}:{password}@{host}:{port}/{target}

Targets may also be supplied via the to= query argument.

Parameter Breakdown

Variable Required Description
user Yes The user associated with your server account (prefix to JID).
password Yes Password for the sender JID
host Yes XMPP server hostname
port No Server port (defaults: 5222 / 5223 depending if you're using xmpp:// or xmpps://)
target No Recipient JID; if no target is specified, then the notification goes to the one assembled from the provided user and host.
mode No Can be set to none, starttls, or tls to enforce the secure mode used
verify No Enable TLS certificate verification (default: yes)
roster No Calls get_roster() under the hood after the XMPP connection is established (default: no)

New Service Completion Status

  • apprise/plugins/xmpp/*
  • pyproject.toml
    • Update keywords section to identify the new service (alphabetically).
  • README.md
    • Add entry for the new service (quick reference only).
  • packaging/redhat/python-apprise.spec
    • add new service into the %global common_description

Checklist

  • Documentation ticket created (if applicable):** apprise-docs/9
  • The change is tested and works locally.
  • No commented-out code in this PR.
  • No lint errors (use tox -e lint and optionally tox -e format).
  • Test coverage added or updated (use tox -e minimal).

Testing

Anyone can help test as follows:

# Create a virtual environment
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@497-xmpp-support

# Send a test notification
apprise -vv -t "Test Title" -b "Test Message" \
  xmpps://<user>:<password>@<xmpp-host>/<target-jid>

# Send a simple message:
apprise -vv -t "Test Title" -b "Hello from Apprise" \
  xmpps:///user:pass@example.com/alice@example.net

# Disable TLS verification:
apprise -vv -b "Test Message" \
  xmpps://user:pass@example.com/alice@example.net?verify=no

@codecov
Copy link

codecov bot commented Feb 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (16c7285) to head (95c0dd9).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##            master     #1505    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files          189       193     +4     
  Lines        24670     24965   +295     
  Branches      4010      4042    +32     
==========================================
+ Hits         24670     24965   +295     
Files with missing lines Coverage Δ
apprise/__init__.py 100.00% <100.00%> (ø)
apprise/plugins/xmpp/__init__.py 100.00% <100.00%> (ø)
apprise/plugins/xmpp/adapter.py 100.00% <100.00%> (ø)
apprise/plugins/xmpp/base.py 100.00% <100.00%> (ø)
apprise/plugins/xmpp/common.py 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mbeko
Copy link

mbeko commented Feb 4, 2026

I have asked the Slixmpp developers to have a look. Here's the reply I received yesterday:

From a quick look:

  • ssl_ctx should be passed to the constructor now
  • encryption is now broken down into three different attributes: enable_starttls, enable_direct_tls, and enable_plaintext (the latter one is disabled by default)
  • client.connect() is awaitable and should be awaited on (returns a future so it might accidentally work in the code I read, but that’s probably not a good idea)
  • process() is gone, loop.run_until_complete(client.disconnected) mostly works the same
  • message receipts could be enabled

@caronc
Copy link
Owner Author

caronc commented Feb 4, 2026

@mbeko , thank you. I'm actually quite happy with the latest version. I've gotten everything to work in my own test environment as well. I fixed the slixmpp to be v1.10.0 as a minimum set version since each version isn't very backwards compatible with earlier releases. Should an upstream change to it break it in Apprise, we'll just pin it to a working version at that time (until we can fix it later).

Thank you for reaching out for help; to your comments:

ssl_ctx should be passed to the constructor now
encryption is now broken down into three different attributes: enable_starttls, enable_direct_tls, and enable_plaintext (the latter one is disabled by default)

This is now handled in this build so we're good.

client.connect() is awaitable and should be awaited on (returns a future so it might accidentally work in the code I read, but that’s probably not a good idea)

The adapter.py logic is correctly awaiting on connect; so we're good here too.

process() is gone, loop.run_until_complete(client.disconnected) mostly works the same
message receipts could be enabled

While i have a process() function in the adapter, under it's hood, this is exactly what it's doing. So we're good here as well.

Documentation preview is here: https://dev.appriseit.com/services/xmpp/. 100% test coverage, so that part is good to go as well.

I think this is ready to go, but would definitely appreciation anyone's further feedback.

@mbeko
Copy link

mbeko commented Feb 4, 2026

Wow, great work! 👏 I'll see if I can get some final feedback from the devs. Tomorrow, I should be able to review the documentation, and test with various parameter combinations.

Nice documentation page, by the way! I somehow missed that the information isn't maintained in the GitHub wiki anymore

@mbeko
Copy link

mbeko commented Feb 5, 2026 via email

@caronc
Copy link
Owner Author

caronc commented Feb 6, 2026

I didn't touch the JID update... but something for a later release perhaps. I did fix the roster point and it's now optional (defaults to off unless ?roster=yes is provided on the comand line.

@caronc caronc merged commit a88bee7 into master Feb 6, 2026
19 checks passed
@caronc caronc deleted the 497-xmpp-support branch February 13, 2026 16:33
@Neustradamus
Copy link

Neustradamus commented Feb 20, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants