Compare commits
2 Commits
6add3c6b70
...
a10f7e6080
Author | SHA1 | Date | |
---|---|---|---|
|
a10f7e6080 | ||
|
598c62451b |
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
scripts/
|
6
Changelog.md
Normal file
6
Changelog.md
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
## [1.0.0] - 2025-09-01
|
||||||
|
### Added
|
||||||
|
- Initial version with control channel.
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
@ -1,3 +1,8 @@
|
|||||||
# simplex-customerservicebot
|
# simplex-customerservicebot
|
||||||
|
|
||||||
A bot to handle customer service using SimpleX chat
|
A bot to handle customer service using SimpleX chat.
|
||||||
|
The bot will join a group specified in the environment variable SXC_CONTROL_GROUP and announce newly created chats.
|
||||||
|
|
||||||
|
Members of the control group can then be invited into the customer chat group by typing 'join <customergroup>'
|
||||||
|
|
||||||
|
This requires a working simplex-chat in the background and joining the operator users as well as the bot into the control group.
|
11
src/simplex-inviter-bot.service
Normal file
11
src/simplex-inviter-bot.service
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Simplex Inviter bot
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
User=simplex
|
||||||
|
ExecStart=/usr/local/bin/simplex-chat -p 5225
|
||||||
|
Restart=always
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
13
src/simplex-inviter-process.service
Normal file
13
src/simplex-inviter-process.service
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Taurix Simplex Customer Service inviter
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
User=simplex
|
||||||
|
Environment="SXC_CONTROL_GROUP=TrxCustomerSupport"
|
||||||
|
WorkingDirectory=/home/simplex
|
||||||
|
ExecStart=/usr/local/bin/simplex_customerservicebot.py
|
||||||
|
Restart=always
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
@ -8,13 +8,13 @@ import websockets
|
|||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
from typing import Any, Dict, Iterable, Tuple
|
from typing import Any, Dict, Iterable, Tuple
|
||||||
|
|
||||||
__version__ = "0.5.6" # exact/recency name resolver + robust sender + case-insensitive join + announce fix
|
__version__ = "1.0.0"
|
||||||
|
|
||||||
# Defaults
|
# Defaults
|
||||||
WS_URL = os.environ.get("SXC_WS", "ws://127.0.0.1:5225")
|
WS_URL = os.environ.get("SXC_WS", "ws://127.0.0.1:5225")
|
||||||
CONTROL_GROUP = (os.environ.get("SXC_CONTROL_GROUP") or "BotTest").strip()
|
CONTROL_GROUP = (os.environ.get("SXC_CONTROL_GROUP") or "BotTest").strip()
|
||||||
ANNOUNCE_NEW = os.environ.get("SXC_ANNOUNCE", "1").strip() != "0"
|
ANNOUNCE_NEW = os.environ.get("SXC_ANNOUNCE", "1").strip() != "0"
|
||||||
DEBUG = os.environ.get("SXC_DEBUG", "1").strip() == "1"
|
DEBUG = os.environ.get("SXC_DEBUG", "0").strip() == "1"
|
||||||
LOG_RAW = os.environ.get("SXC_LOG_RAW", "0").strip() == "1"
|
LOG_RAW = os.environ.get("SXC_LOG_RAW", "0").strip() == "1"
|
||||||
|
|
||||||
INVITE_CMDS = ["/a", "a"] # try WS-style first, then CLI-style
|
INVITE_CMDS = ["/a", "a"] # try WS-style first, then CLI-style
|
||||||
|
Loading…
x
Reference in New Issue
Block a user