23 Commits

Author SHA1 Message Date
Harvey Tindall
b5f28da452 updater: demote "tag empty" to debug log
the stable tag is usually empty because i rarely update it so it'd be
nice if this didn't show up so much for normal users. For #313, #329 and
more, probably.
2025-11-21 17:22:49 +00:00
Harvey Tindall
60dbfa2d1e messages: custom content described in customcontent.go, message tests
customcontent.go constains a structure with all the custom content,
methods for getting display names, subjects, etc., and a list of
variables, conditionals, and placeholder values. Tests for constructX
methods included in email_test.go, and all jfa-go tests can be run with
make INTERNAL=off test.
2025-08-30 14:21:26 +01:00
Harvey Tindall
e5f79c60ae webhooks: add "user created" webhook
Webhooks send a POST to an admin-supplied URL when something happens,
with relevant information sent in JSON. One has been added for creating
users in Settings > Webhooks > User Created.

Lazily, the portion of GetUsers which generates a respUser has been
factored out, and is called to send the JSON payload.

A stripped-down common.Req method has been added, which is used by the
barebones WebhookSender struct.
2024-08-20 21:45:31 +01:00
Harvey Tindall
8307d3da90 proxy: use for updater
don't know how I missed before.
2024-08-20 20:38:18 +01:00
Harvey Tindall
0e7245e6b9 update: distinguish E2EE builds
done in the same way as TrayIcon
2024-08-11 20:00:55 +01:00
Harvey Tindall
711394232b logmessages: all log strings in one file
EXCEPT: migrations.go, log strings there aren't gonna be repeated
anywhere else, are very specific, and will probably change a lot.
2024-08-01 20:17:05 +01:00
Harvey Tindall
733ab37539 backups: add backup daemon to run every n minutes, keep x most recent backups 2023-12-21 13:03:16 +00:00
Harvey Tindall
c0c91b4aad drone: source buildrone key from drone in docker build 2023-12-20 20:06:44 +00:00
Harvey Tindall
5702e8012c proxy: use for updater & SMTP
imports a new package to create a HTTP proxy dialer for the SMTP client.
2023-10-05 12:32:25 +01:00
Harvey Tindall
084a62e60f updater: account for build/publish time diff 2023-09-08 19:00:19 +01:00
Harvey Tindall
b7b3aa1eb7 build: fix goreleaser, include optional builder name
builder name shows up in about section again, as does the build time.
2023-06-23 14:41:21 +01:00
Harvey Tindall
f083d6b53f updater: include build date, check against updates
build time is included in the binary, so the buildrone release date is
compared to it when deciding if something is an update or not.
2023-06-23 14:16:36 +01:00
Harvey Tindall
9395165916 updater: check build is ready 2022-01-30 18:25:47 +00:00
Harvey Tindall
85536ff79e expand CONTRIBUTING, print if tray enabled on startup 2021-05-24 15:58:43 +01:00
Harvey Tindall
e7d1693517 Enable updater for Tray builds 2021-05-23 23:20:14 +01:00
Harvey Tindall
e78b4882b3 Fix updater for zip files
Forgot to change this when I switched, oops.
2021-05-23 23:05:40 +01:00
Harvey Tindall
0e21942cd6 add hard restart for updates on *nix
reincarnates app.Restart() removed in
bbb0568cc4 as app.HardRestart().
2021-05-03 20:08:23 +01:00
Harvey Tindall
2687af31ca updater: immediately store executable
for some reason I kept the response body and downloaded file in memory,
which led to timeouts and failed updates.
2021-04-07 18:17:18 +01:00
Harvey Tindall
a8bf670697 dont log updates when disabled 2021-03-20 23:20:07 +00:00
Harvey Tindall
30bef15855 Trim commit before comparing in IsNew()
Fixes the current version appearing as an update. Also fixed error
handling when no update is available, which obviously hadn't previously
been experienced.
2021-03-09 15:52:15 +00:00
Harvey Tindall
7bd8fadf76 IsNew() compares commit, not version 2021-03-07 17:24:45 +00:00
Harvey Tindall
21490faa9e fix IsNew() func, include LICENSE in goreleaser 2021-03-07 16:45:35 +00:00
Harvey Tindall
92332206f0 add basic update functionality
If enabled, jfa-go pings buildrone (hosted at builds.hrfee.pw) every 30
min for new updates. If there is one, it gets information (and if
applicable, a binary) from the appropriate source (buildrone, github, or
dockerhub) and displays it on the admin page. You can switch update
channels between stable and unstable. For binary releases, updates are
downloaded automatically and installed when the user presses update.

Since this obviously introduces some "phone-home" functionality into
jfa-go, I just want to say IPs are not and will not be logged by
buildrone, although I may later introduce functionality to give a rough
idea of the number of users (again, no IPs stored). The whole thing can
also be turned off in settings.
2021-03-07 15:23:44 +00:00