Skip to content

Commit

Permalink
SignalAPI Status Display
Browse files Browse the repository at this point in the history
  • Loading branch information
caronc committed Aug 20, 2023
1 parent 31caff1 commit 3d40a46
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions apprise/plugins/NotifySignalAPI.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ class NotifySignalAPI(NotifyBase):
'status': {
'name': _('Show Status'),
'type': 'bool',
'default': False,
'default': True,
},
})

Expand Down Expand Up @@ -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
10 changes: 5 additions & 5 deletions test/test_plugin_signal.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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)

Expand All @@ -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)

Expand Down Expand Up @@ -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)

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 3d40a46

Please sign in to comment.