From 08d6912637100ec23e713328c223526cf441e5f4 Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Wed, 6 Dec 2017 20:26:01 +0100 Subject: [PATCH] Add disable_notification parameter --- pyrogram/client/client.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pyrogram/client/client.py b/pyrogram/client/client.py index 88112114..db166c7b 100644 --- a/pyrogram/client/client.py +++ b/pyrogram/client/client.py @@ -340,13 +340,12 @@ class Client: ) ) - def send_message( - self, - chat_id: int or str, - text: str, - disable_web_page_preview: bool = None, - reply_to_msg_id: int = None, - ): + def send_message(self, + chat_id: int or str, + text: str, + disable_web_page_preview: bool = None, + disable_notification: bool = None, + reply_to_msg_id: int = None): # TODO: Resolve usernames when they don't exists yet (contacts.ResolveUsername) if chat_id in ("self", "me"): @@ -389,7 +388,8 @@ class Client: peer=input_peer, message=text, random_id=self.rnd_id(), - no_webpage=disable_web_page_preview, + no_webpage=disable_web_page_preview or None, + silent=disable_notification or None, reply_to_msg_id=reply_to_msg_id, entities=entities )