From 19f8d5f48ca5e813f254f03499ee6721e19158b7 Mon Sep 17 00:00:00 2001 From: debug Date: Wed, 15 Jan 2020 11:45:40 +0800 Subject: [PATCH] Swapped push notification library --- vfxClientToolkit/utils/push.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/vfxClientToolkit/utils/push.py b/vfxClientToolkit/utils/push.py index a1c5f7b..fae9d86 100644 --- a/vfxClientToolkit/utils/push.py +++ b/vfxClientToolkit/utils/push.py @@ -1,13 +1,9 @@ -from pushover import Pushover import vfxClientToolkit.api.config as vfxConfig +from pushover import Client CONFIG_DATA = vfxConfig.getBundles() def sendPushNotification(title, message): - po = Pushover(CONFIG_DATA['push']['settings']['token']) - po.user(CONFIG_DATA['push']['settings']['user']) - msg = po.msg(message) - msg.set("vfxClientToolkit", title) - po.send(msg) - + client = Client(CONFIG_DATA['push']['settings']['user'], api_token=CONFIG_DATA['push']['settings']['token']) + client.send_message(message, title=title)