Open bladecell opened 3 weeks ago
Try adding ?format=markdown
to the Apprise URL
Thanks, changing the url to matrixs://<username>:<pass>@matrix.org/<room>:matrix.org?format=markdown
fixed the issue
Great. Apprise has no idea what it is being fed (html, text, or markdown), so it doesn't make any rash or advanced (extra) decisions with it until you direct it.
Glad you're back in business!🙏
@bladecell can you try this code?
import apprise
# Create an Apprise instance
apobj = apprise.Apprise()
# Define the Matrix URL with the Markdown format
matrix_url = "matrixs://<username>:<pass>@matrix.org?format=markdown/<room>:matrix.org"
# Add the Matrix URL to the Apprise object
apobj.add(matrix_url)
# Define your Markdown message
markdown_message = """
# Hello, Matrix!
This is a **Markdown** formatted message.
- Item 1
- Item 2
- Item 3
"""
# Send the notification
apobj.notify(
body=markdown_message,
title="Markdown Notification",
body_format="Markdown"
)
I want to see if my understanding of the python API is correct
Your URL should read:
matrix_url = "matrixs://<username>:<pass>@matrix.org/<room>:matrix.org?format=markdown"
The body_,format should also be markdown
(all lower case). I may have safe guards in place... So it's possible it Will work with the first charter upshifted; is avoid the risk though
Your URL should read:
matrix_url = "matrixs://<username>:<pass>@matrix.org/<room>:matrix.org?format=markdown"
but shouldnt body_format
in the call work? (If i understand what you're saying here :) )
@bladecell can you try this code?
import apprise # Create an Apprise instance apobj = apprise.Apprise() # Define the Matrix URL with the Markdown format matrix_url = "matrixs://<username>:<pass>@matrix.org?format=markdown/<room>:matrix.org" # Add the Matrix URL to the Apprise object apobj.add(matrix_url) # Define your Markdown message markdown_message = """ # Hello, Matrix! This is a **Markdown** formatted message. - Item 1 - Item 2 - Item 3 """ # Send the notification apobj.notify( body=markdown_message, title="Markdown Notification", body_format="Markdown" )
I want to see if my understanding of the python API is correct
this returns 0
@bladecell thats not what I was asking, what I want to know is if the message is sent or not to matrix in correct Markdown format?
@bladecell can you try this code?
import apprise # Create an Apprise instance apobj = apprise.Apprise() # Define the Matrix URL with the Markdown format matrix_url = "matrixs://<username>:<pass>@matrix.org?format=markdown/<room>:matrix.org" # Add the Matrix URL to the Apprise object apobj.add(matrix_url) # Define your Markdown message markdown_message = """ # Hello, Matrix! This is a **Markdown** formatted message. - Item 1 - Item 2 - Item 3 """ # Send the notification apobj.notify( body=markdown_message, title="Markdown Notification", body_format="Markdown" )
I want to see if my understanding of the python API is correct
this returns 0
@bladecell thats not what I was asking, what I want to know is if the message is sent or not to matrix in correct Markdown format?
@bladecell can you try this code?
import apprise # Create an Apprise instance apobj = apprise.Apprise() # Define the Matrix URL with the Markdown format matrix_url = "matrixs://<username>:<pass>@matrix.org?format=markdown/<room>:matrix.org" # Add the Matrix URL to the Apprise object apobj.add(matrix_url) # Define your Markdown message markdown_message = """ # Hello, Matrix! This is a **Markdown** formatted message. - Item 1 - Item 2 - Item 3 """ # Send the notification apobj.notify( body=markdown_message, title="Markdown Notification", body_format="Markdown" )
I want to see if my understanding of the python API is correct
this returns 0
It did not send message
I could see value in adjusting the format
automatically under the hood (if not specified and a body_format
is). But this isn't in place yet.
The only reason is all 100+ notifications support text, only some support the others. So there is the edge case that i need to go though all of the plugins and identify what they can be. THEN i could look at the body_format
thereafter and compare it at a per notification and if supported, then alter the default value.
Not sure if that makes sense, but it's a big job(not hard, but very big and error prone), so not something I've attempted yet.
For now Apprise runs through its conversions only if it has the explicit info to do so
Change Markdown
to markdown
I'm replying on my phone, I'll see if i can have a closer look later on
@bladecell i can see in your last message that you have not applied my suggestions to change your URL. 2-3 comments up. This is why it's not working for you now. The Matrix Apprise URL is not valid in the format you recently changed it to
:mega: Notification Service(s) Impacted Matrix
:lady_beetle: Describe the bug
Sending markdown message does not result in message being interpreted in markdown, while same message in chat app results in markdown preview.
:bulb: Screenshots and Logs apprise chat app