mirror of
https://github.com/caronc/apprise.git
synced 2025-01-09 07:28:39 +01:00
Bugfix: Telegram attachments respect topic thread (#893)
This commit is contained in:
parent
ab55aef0d0
commit
b6e07dd35e
@ -471,11 +471,14 @@ class NotifyTelegram(NotifyBase):
|
|||||||
# content can arrive together.
|
# content can arrive together.
|
||||||
self.throttle()
|
self.throttle()
|
||||||
|
|
||||||
|
payload = {'chat_id': chat_id}
|
||||||
|
if self.topic:
|
||||||
|
payload['message_thread_id'] = self.topic
|
||||||
|
|
||||||
try:
|
try:
|
||||||
with open(path, 'rb') as f:
|
with open(path, 'rb') as f:
|
||||||
# Configure file payload (for upload)
|
# Configure file payload (for upload)
|
||||||
files = {key: (file_name, f)}
|
files = {key: (file_name, f)}
|
||||||
payload = {'chat_id': chat_id}
|
|
||||||
|
|
||||||
self.logger.debug(
|
self.logger.debug(
|
||||||
'Telegram attachment POST URL: %s (cert_verify=%r)' % (
|
'Telegram attachment POST URL: %s (cert_verify=%r)' % (
|
||||||
|
Loading…
Reference in New Issue
Block a user