caronc / apprise

Apprise - Push Notifications that work with just about every platform!
https://hub.docker.com/r/caronc/apprise
BSD 2-Clause "Simplified" License
10.9k stars 384 forks source link

Automatically increment Matrix v3 transaction IDs #1128

Closed nmaggioni closed 1 month ago

nmaggioni commented 1 month ago

Description:

Related issue (if applicable): Closes #1127

This is a possible solution to the related issue: internally increment the transaction ID each time a request is made against the Matrix v3 API. An alternative could be exposing the txnID to the user as either an URL parameter or a Python setter, but I don't think that would be useful to most people.

New Service Completion Status

N/A

Checklist

Testing

Anyone can help test this source code as follows:

# Create a virtual environment to work in as follows:
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/nmaggioni/apprise.git@nm_matrix_v3_txnid

# Test out the changes with the following script:
#!/usr/bin/env python3
import apprise

apobj = apprise.Apprise()
apobj.add('matrixs://{user}:{password}@{matrixhost}/!{room_id}?v=3')
apobj.notify(body='First message')
apobj.notify(body='Second message')
caronc commented 1 month ago

Thank you for this pr!🙏