Receive Messages via dbus command. #431
Unanswered
snowkidind
asked this question in
Q&A
Replies: 2 comments
-
Some info on converting between different representations of `groupId`s is in #272. General info on dbus interface is in the wiki
https://github.com/AsamK/signal-cli/wiki/DBus-service
The config lock issue happens because only one process of signal-cli should be run at the same time. The daemon should be started with
`signal-cli -u USERNAME daemon`
and all the subsequent calls should be made through the dbus interface (`dbus-send ..`); not by starting another signal-cli process (i.e. not: `signal-cli ..`).
if using the daemon, one must catch all messages or they are lost
Yes, once the messages are delivered to signal-cli, they are deleted from the signal servers. It's the same in non-daemon mode, I believe. It's up to your program how to process and store them.
but not both simultaneously
signal-cli daemon does listen simultaneously for any new messages from the signal servers and any outgoing messages it receives through dbus. How to handle this concurrency is, again, up to your program.
…On Tue-16:52, Keny Ruyter wrote:
On my project, I am trying to improve the speed and accuracy at which the cli operates and therefore attempting to integrate via dbus. I have a couple issues. For one, I don't really see a function reference for available dbus commands.
Observing `signal-cli-master/src/main/java/org/asamk/Signal.java` I am assuming the DBus interface comprises the available calls via dbus-send: (Are these the appropriate functions to reference?)
`dbus-send --system --type=method_call --print-reply --dest="org.asamk.Signal" /org/asamk/Signal org.asamk.Signal.sendMessage string:dbusSending array:string: string:+123457891`
Couple things: The getGroupIds returns arrays of bytes, contrary to the strings provided by the basic, non DBus implementation. Any guide on this formatting?
Also I need to _send_ and _receive_ messages, I am unsure how to operate the daemon and the dbus-send interfaces at the same time because of the config file lock issue:
`Config file is in use by another instance, waiting…`
Further, if using the daemon, one must catch all messages or they are lost, and cannot be retrieved with a retroactive basic call to receive queued messages. I am gathering my instance can either be catching messages or performing tasks, but not both simultaneously.
Is there a way to suspend the daemon and catch non caught messages while the daemon is down? Or better, (not great with dBus here) any way to pull messages safely off of DBus?
Pardon me, and please correct me if my logic is wrong, I am new to DBus and can't seem to find appropriate documentation.
Thanks
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
#376
-------------------------------------------------
This free account was provided by VFEmail.net - report spam to abuse@vfemail.net
ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Actually the cli allows me to get messages queued for delivery, better late than never. Using dbus was a great improvement on speed but maybe there should be some sort of setting to queue incoming messages instead of dropping them. Or at the least an option to print the data to a log with ids that can be parsed later. Looks like it still has a way to go though. An OSX complaint though: Every time I get a config file lock, Java dumps right in the root directory of my project. Commit that accidentally? Oof |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
On my project, I am trying to improve the speed and accuracy at which the cli operates and therefore attempting to integrate via dbus. I have a couple issues. For one, I don't really see a function reference for available dbus commands.
Observing
signal-cli-master/src/main/java/org/asamk/Signal.java
I am assuming the DBus interface comprises the available calls via dbus-send: (Are these the appropriate functions to reference?)dbus-send --system --type=method_call --print-reply --dest="org.asamk.Signal" /org/asamk/Signal org.asamk.Signal.sendMessage string:dbusSending array:string: string:+123457891
Couple things: The getGroupIds returns arrays of bytes, contrary to the strings provided by the basic, non DBus implementation. Any guide on this formatting?
Also I need to send and receive messages, I am unsure how to operate the daemon and the dbus-send interfaces at the same time because of the config file lock issue:
Config file is in use by another instance, waiting…
Further, if using the daemon, one must catch all messages or they are lost, and cannot be retrieved with a retroactive basic call to receive queued messages. I am gathering my instance can either be catching messages or performing tasks, but not both simultaneously.
Is there a way to suspend the daemon and catch non caught messages while the daemon is down? Or better, (not great with dBus here) any way to pull messages safely off of DBus?
Pardon me, and please correct me if my logic is wrong, I am new to DBus and can't seem to find appropriate documentation.
Thanks
Beta Was this translation helpful? Give feedback.
All reactions