mirror of
https://github.com/jooray/signal-monitoring.git
synced 2026-01-27 00:43:41 +00:00
Add support for groups
This commit is contained in:
parent
d85bcaecf0
commit
d23062588a
21
README.md
21
README.md
@ -115,20 +115,31 @@ dependant on single infrastructure provider, anyone can run a node, but it is
|
||||
highly secure.
|
||||
|
||||
We can use [command-line version](https://github.com/simplex-chat/simplex-chat/blob/stable/docs/CLI.md).
|
||||
After installation, you need to choose a display name and connect to profile
|
||||
that should receive notifications (using /c command). After you are connected,
|
||||
write nickname into
|
||||
After installation, you need to choose a display name and connect to a user or group
|
||||
that should receive notifications. Use the /c command to connect to a user, or the /g
|
||||
command to connect to a group. After you are connected, write the nickname or group name
|
||||
into the configuration file, prefixing it with @ for users or # for groups:
|
||||
|
||||
```
|
||||
SIMPLEX_DESTINATION="nickname"
|
||||
SIMPLEX_DESTINATION="@nickname" # for users
|
||||
```
|
||||
or
|
||||
```
|
||||
SIMPLEX_DESTINATION="#groupname" # for groups
|
||||
```
|
||||
|
||||
If something does not work, the command that should work is:
|
||||
If something does not work, the command that should work for sending to a user is:
|
||||
|
||||
```
|
||||
simplex-chat -e '@nickname This is a test' -t 10
|
||||
```
|
||||
|
||||
For sending to a group, use:
|
||||
|
||||
```
|
||||
simplex-chat -e '#groupname This is a test' -t 10
|
||||
```
|
||||
|
||||
## Why this project
|
||||
|
||||
I wanted to be able to perform a simple monitoring for my hosted server from
|
||||
|
||||
@ -21,8 +21,15 @@ LXMF_NAME="LXMF bot signal-monitoring"
|
||||
LXMF_PROPAGATION="32112312312312312312312312312312"
|
||||
|
||||
### For simplex-chat command-line utility
|
||||
# Nickname of already connected user (use /c)
|
||||
SIMPLEX_DESTINATION="nickname"
|
||||
# Nickname of already connected user (use /c) or group (use /g)
|
||||
# Prefix user with @ and group with #
|
||||
|
||||
SIMPLEX_DESTINATION="@nickname"
|
||||
|
||||
# Time to wait for Simplex - this needs to be long enough to send the message to
|
||||
# the relay. See: https://github.com/simplex-chat/simplex-chat/issues/5196
|
||||
# The command is sent to background, so it won't block processing
|
||||
SIMPLEX_WAIT=10
|
||||
|
||||
# now go to the notify function below, choose which notification mechanism
|
||||
# to use.
|
||||
@ -50,7 +57,7 @@ function notify {
|
||||
# LXMF / Reticulum / Sideband
|
||||
#echo "$1" | LXMF-NotifyBot.py "${LXMF_DESTINATION}" "${LXMF_NAME}" "${LXMF_PROPAGATION}" > /dev/null
|
||||
# SimpleX
|
||||
#(simplex-chat -e "@${SIMPLEX_DESTINATION} ${1}" -t 10 > /dev/null) &
|
||||
#(simplex-chat -e "${SIMPLEX_DESTINATION} ${1}" -t ${SIMPLEX_WAIT} > /dev/null) &
|
||||
log "Sending notification ${1}"
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user