From 265423bc7bedc25f5e899830e3791bcfac9992d8 Mon Sep 17 00:00:00 2001 From: exquo <62397152+exquo@users.noreply.github.com> Date: Wed, 30 Jun 2021 08:09:40 +0000 Subject: [PATCH] Usage: username optional; fix python script --- DBus-service.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/DBus-service.md b/DBus-service.md index 75c2f21..e0cc7a4 100644 --- a/DBus-service.md +++ b/DBus-service.md @@ -4,7 +4,7 @@ signal-cli can run in daemon mode and provides an experimental dbus interface. * Run in daemon mode (dbus session bus) - signal-cli -u USERNAME daemon + signal-cli [-u USERNAME] daemon * Send a message via dbus @@ -72,11 +72,15 @@ from gi.repository import GLib bus = SystemBus() loop = GLib.MainLoop() -signal = bus.get('org.asamk.Signal') +signal = bus.get('org.asamk.Signal') +# NOTE: when daemon was started without explicit `-u USERNAME`, replace the line above with +# signal = bus.get("org.asamk.Signal", "/org/asamk/Signal/_YOURPHONENUMBER") signal.onMessageReceived = msgRcv loop.run() ``` + + Here's an example using Perl: ```perl #!/bin/perl