Skip to content

Commit

Permalink
Update notify.py
Browse files Browse the repository at this point in the history
  • Loading branch information
t0mer authored Aug 13, 2024
1 parent b1356ca commit d671add
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/greenapi/notify.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def get_service(hass, config, discovery_info=None):

class GreenAPINotificationService(BaseNotificationService):

def __init__(self, title, token,instance_id, target, linkPreview=False):
def __init__(self, title, token,instance_id, target):
"""Initialize the service."""
self._title = title
self._token = token
Expand Down Expand Up @@ -62,6 +62,6 @@ def send_message(self, message="", **kwargs):
file_name = basename(url.path)
send_file_by_url_response = self._greenAPI.sending.sendFileByUrl(target, url_file, file_name, caption=message)
else:
self._greenAPI.sending.sendMessage(target, message)
self._greenAPI.sending.sendMessage(target, message, linkPreview=False)
except Exception as e:
_LOGGER.error("Sending message to %s: has failed with the following error %s", kwargs.get(ATTR_TARGET)[0] ,str(e))

0 comments on commit d671add

Please sign in to comment.