From: Matthias Bach Date: Mon, 18 Jul 2022 20:53:11 +0200 Subject: [PATCH] Add compatibility with emoji 2.0 References: https://github.com/dschep/ntfy/pull/250 Upstream: submitted Emoji deprecated the use_alias parameter in 1.6.2. This changes our use to the new API which exists since that version. Without this change, ntfy cannot be used with emoji 2.0 or higher. --- ntfy/cli.py | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ntfy/cli.py b/ntfy/cli.py index 7dad0b2..41145fd 100644 --- a/ntfy/cli.py +++ b/ntfy/cli.py @@ -358,7 +358,7 @@ def main(cli_args=None): if message is None: return 0 if emojize is not None and not args.no_emoji: - message = emojize(message, use_aliases=True) + message = emojize(message, language='alias') return notify( message, args.title, diff --git a/setup.py b/setup.py index 1008f5f..f7321cd 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ extra_deps = { 'sleekxmpp', 'dnspython' if version_info[0] < 3 else 'dnspython3'], 'telegram': ['telegram-send'], 'instapush': ['instapush'], - 'emoji': ['emoji'], + 'emoji': ['emoji >= 1.6.2'], 'pid':['psutil'], 'slack':['slacker'], 'rocketchat':['rocketchat-API'], -- 2.35.3