Commit Graph

26 Commits

Author SHA1 Message Date
Harvey Tindall
e67f1bf1a9 emails: fix and confirm function of all emails
both custom and standard emails tested, quite a few fixes made,
including to an old bug with admin notifs.
2025-08-31 17:12:50 +01: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
41ddf73e4f invites: emails -> messages, log when sendTo attempted when disabled
A user's lengthy debugging resulted in them figuring out "Invite
emails" being disabled stopped the "/inv" command from sending invites
on discord, which makes sense except the confusing setting name (now
renamed "Messages" in the UI), and the fact that no error was reported.
This setting being disabled is now logged to the console when it's
attempted through the admin page or discord. For #378.
2025-07-14 13:58:03 +01:00
Harvey Tindall
eb619b6544 invites: fix /count routes
both now filter for IsReferral == true, and a typo in /used was fixed.
2025-05-27 18:48:46 +01:00
Harvey Tindall
80fd7c9842 invite: add /count/used route
counts the number of active invites which have been used.
2025-05-27 18:31:01 +01:00
Harvey Tindall
9409370984 invites: add /count route 2025-05-27 18:30:06 +01:00
Harvey Tindall
7c808b56f7 api: adjust a couple of URIs
adjusted some things, likke changing /newUser to /user/invite.
2024-08-21 20:35:08 +01:00
Harvey Tindall
f348262f88 logmessages: finish up to api-users (alphabetically), refactor
.go files done in alphabetical order. Some refactoring done to
checkInvite(s) so they share most code. Also removed some useless debug
lines.
2024-08-01 13:59:24 +01:00
Harvey Tindall
4f5d12f800 invites: ui adjustments, fix duration display > 1y 2023-12-24 02:29:14 +00:00
Harvey Tindall
f823705e40 ips: log on activities, show on card 2023-12-23 21:47:41 +00:00
Harvey Tindall
a66c522b73 referrals: add "use expiry" option
adds an option when enabling referrals to use the duration of the source
invited (i.e., months, days, hours) for the referral invite. If enabled,
the user won't be able to make a new referral link after it expires. For
referrals enabled for new users via a profile, the clock starts ticking
as soon as the account is created.
2023-11-10 15:07:29 +00:00
Harvey Tindall
a288ba4461 Merge remote-tracking branch 'origin/main' into activity-log 2023-10-23 18:00:56 +01:00
Harvey Tindall
f34ba5df18 invites: fix sending invite to @username discord format
whether something was an email or not was being decided by checking for
an "@", so the new format didn't work.
2023-10-23 17:59:18 +01:00
Harvey Tindall
1032e4e747 activity: more presentable cards, fixes
fixed some missing data (being stored and being shown), improved layout,
also usernames are now injected by the route.
2023-10-20 22:16:40 +01:00
Harvey Tindall
a73dfddd3f activity: partially functional frontend code
doesn't fill in all the blanks yet, but almost there ish. Filters &
stuff not done yet, just loads everything.
2023-10-20 18:14:32 +01:00
Harvey Tindall
b620c0d9ae activity: implement most initial logging
resetPassword, changePassword, delete/createInvite, enable/disable,
creation/deletion of invites & users are all done, only remaining one is
account linking.
2023-10-19 18:56:35 +01:00
Harvey Tindall
77f6b1042e invites: move code gen to function
code to generate an invite code w/ a non-integer first character was
reused a bunch, so it's now function GenerateInviteCode().
2023-10-11 11:30:28 +01:00
Harvey Tindall
7c76b58ab8 invites: add "User Label" 1/2
Adds a "User Label" invite field, which is a label applied to users
created with it. This commit contains everything apart from the code to
apply it on account creation.
2023-09-08 14:29:25 +01:00
Harvey Tindall
a0f1cd5814 captcha: fix missing images
The captcha library's data struct wasn't being serialized/deserialized
fully, meaning the image was never stored. I never really wanted it to
be stored anyway, but as a compromise, the invite daemon now deletes
captcha images from the DB 20 minutes after generation.
2023-09-07 22:38:23 +01:00
Harvey Tindall
9c2f27bcdb referrals: 1/2 generation routes, display route, partial frontend
route for generation/enabling of referral for user(s) done? the frontend
is mostly done, but functionality is not there yet. Route for finding
and displaying referral to user is done. Also the config option for
referral is there, in user page settings.
2023-06-28 16:05:24 +01:00
Harvey Tindall
e1c215b72e db: remove remaining storage.loadX calls 2023-06-25 20:18:40 +01:00
Harvey Tindall
a735e4ff29 db: migrate user profiles 2023-06-24 21:29:54 +01:00
Harvey Tindall
63948a6de0 db: migrate invites, user expiry
some fixes to stuff in there too, probably
2023-06-24 19:13:05 +01:00
Harvey Tindall
f779f0345e storage: Use familiar api for invite access
An almost identical set of functions to the discord/telegram/matrix
storage ones is now used for accessing invites. No more
parallelism-related issues, yay. Need to do this for everything
eventually.
2023-06-21 20:39:16 +01:00
Harvey Tindall
68004e1d34 storage: user set/get methods for contact method access
Get/GetKey/SetKey/DeleteKey methods are used for access to
email/discord/telegram/matrix, everywhere. Mutex added for each, avoids
concurrent read/write issues. Will also make potential transition to
database easier.
2023-06-20 12:19:24 +01:00
Harvey Tindall
12db53d1eb reorganise api, add "Connection refused" error in setup
fixes #201
2022-03-22 14:58:39 +00:00