HTTP API: register, list and remove webhooks, kept across restarts (closes #6)
check / check (push) Successful in 1m2s
check / check (push) Successful in 1m2s
POST, GET and DELETE under /api/v1/chats/{id}/webhooks, for the chats
that GET /api/v1/chats lists. The webhooks are kept in
$DATA_DIR/webhooks.json, mode 0600, which each change replaces whole
through a temporary file in the same directory and a rename. bot.Run
reads the file before it starts the chat client: absent means none, and
a file that cannot be read aborts startup. Reading a JSON request body
moved into decodeBody, which the messages endpoint now shares. Nothing
is posted to a webhook yet.
Model: opus-5-5
This commit is contained in:
+3
-3
@@ -109,9 +109,9 @@ WORKDIR /app
|
||||
COPY --from=builder /build/bin/simplexcalc /app/simplexcalc
|
||||
|
||||
# Data directory: the SimpleX database, which holds the bot's profile,
|
||||
# its keys, its address and its contacts. Mount a volume over it;
|
||||
# without one, the bot gets a new address every time the container is
|
||||
# recreated.
|
||||
# its keys, its address and its contacts, and the API's webhooks. Mount
|
||||
# a volume over it; without one, the bot gets a new address and loses
|
||||
# its webhooks every time the container is recreated.
|
||||
RUN mkdir -p /var/lib/simplexcalc && \
|
||||
chown simplexcalc:simplexcalc /var/lib/simplexcalc
|
||||
|
||||
|
||||
Reference in New Issue
Block a user