From 3d40a461ca340c5da06ef8467d942152a789d9b3 Mon Sep 17 00:00:00 2001 From: Chris Caron Date: Sun, 20 Aug 2023 11:07:34 -0400 Subject: [PATCH] SignalAPI Status Display --- apprise/plugins/NotifySignalAPI.py | 4 ++-- test/test_plugin_signal.py | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/apprise/plugins/NotifySignalAPI.py b/apprise/plugins/NotifySignalAPI.py index 35fad739d5..7f751f5dd3 100644 --- a/apprise/plugins/NotifySignalAPI.py +++ b/apprise/plugins/NotifySignalAPI.py @@ -158,7 +158,7 @@ class NotifySignalAPI(NotifyBase): 'status': { 'name': _('Show Status'), 'type': 'bool', - 'default': False, + 'default': True, }, }) @@ -490,6 +490,6 @@ def parse_url(url): # Get status switch results['status'] = \ - parse_bool(results['qsd'].get('status', False)) + parse_bool(results['qsd'].get('status', True)) return results diff --git a/test/test_plugin_signal.py b/test/test_plugin_signal.py index 5b3ec6cea1..b6e66cebda 100644 --- a/test/test_plugin_signal.py +++ b/test/test_plugin_signal.py @@ -199,7 +199,7 @@ def test_plugin_signal_edge_cases(request_mock): details = request_mock.call_args_list[0] assert details[0][0] == 'https://localhost:231/v2/send' payload = loads(details[1]['data']) - assert payload['message'] == 'My Title\r\ntest body' + assert payload['message'] == '[i] My Title\r\ntest body' # Reset our mock object request_mock.reset_mock() @@ -279,7 +279,7 @@ def test_plugin_signal_based_on_feedback(request_mock): aobj = Apprise() aobj.add( 'signal://10.0.0.112:8080/+12512222222/+12513333333/' - '12514444444?batch=yes') + '12514444444?batch=yes&status=no') assert aobj.notify(title=title, body=body) @@ -302,7 +302,7 @@ def test_plugin_signal_based_on_feedback(request_mock): aobj = Apprise() aobj.add( 'signal://10.0.0.112:8080/+12512222222/+12513333333/' - '12514444444?batch=no') + '12514444444?batch=no&status=no') assert aobj.notify(title=title, body=body) @@ -333,7 +333,7 @@ def test_plugin_signal_based_on_feedback(request_mock): aobj = Apprise() aobj.add( 'signal://10.0.0.112:8080/+12513333333/@group1/@group2/' - '12514444444?batch=yes') + '12514444444?batch=yes&status=no') assert aobj.notify(title=title, body=body) @@ -365,7 +365,7 @@ def test_notify_signal_plugin_attachments(request_mock): obj = Apprise.instantiate( 'signal://10.0.0.112:8080/+12512222222/+12513333333/' - '12514444444?batch=no') + '12514444444?batch=no&status=no') assert isinstance(obj, NotifySignalAPI) # Test Valid Attachment