Skip to content

Commit

Permalink
Don't add empty token to list of push tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
mhoran committed Mar 23, 2024
1 parent bf954ba commit 8c2aec8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/weechatrn.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,10 @@ def weechatrn_cb(data: str, buffer: str, args: str) -> int:
Command to allow managing push tokens without the need to allow /set access
to relay clients.
"""
token = args.strip()
tokens = script_options.push_tokens
if args not in tokens:
tokens.append(args)
if token and token not in tokens:
tokens.append(token)
script_options.push_tokens = tokens
return weechat.WEECHAT_RC_OK

Expand Down

0 comments on commit 8c2aec8

Please sign in to comment.