Commit 6e48f01c authored by Daniel Brötzmann's avatar Daniel Brötzmann
Browse files

Helpers: Allow play_sound to have no account

parent a0c8587b
......@@ -466,13 +466,14 @@ def get_contact_dict_for_account(account: str) -> dict[str, types.BareContact]:
def play_sound(sound_event: str,
account: str,
account: Optional[str] = None,
force: bool = False,
loop: bool = False) -> None:
if sound_event is None:
return
if force or allow_sound_notification(account, sound_event):
if (force or account is None or
allow_sound_notification(account, sound_event)):
play_sound_file(
app.settings.get_soundevent_settings(sound_event)['path'], loop)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment