leander and Claude Opus 5.5
aef7753751
resolve roles with at most one fetch_roles call per update
...
Previously every role missing from the cache triggered its own fetch_roles
call, for every user in the membership check.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com >
2026-10-23 02:44:44 +02:00
leander and Claude Opus 5.5
3e4561367c
only send role changes the member doesn't already have
...
add_roles and remove_roles make one API call per role, and every role linked
to any Galtinn group was removed from every user on every run.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com >
2026-10-23 02:44:20 +02:00
leander and Claude Opus 5.5
9d72cf9da6
skip unresolvable and unmanageable roles instead of aborting the whole update
...
A single deleted or too-high role linked to any Galtinn group was part of
every user's removal set, which made role updates fail for all users.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com >
2026-10-23 02:44:09 +02:00
leander and Claude Opus 5.5
0737a2c322
reconnect the db listener when its connection is lost
...
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com >
2026-10-23 02:43:09 +02:00
leander and Claude Opus 5.5
346b4558bd
give the db listener a dedicated connection that is closed on cog unload
...
The listener previously held a pool connection that was never released and
kept its callback registered after a reload, so every reload leaked a pool
connection and added another handler for each notification.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com >
2026-10-23 02:42:05 +02:00
leander and Claude Opus 5.5
13703c35a2
use S256 pkce challenge instead of plain
...
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com >
2026-10-23 02:38:43 +02:00
leander and Claude Opus 5.5
da06dfd5c1
stop holding the register command open to expire the verification
...
Expiry is enforced by the verification server and the cleanup loop.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com >
2026-10-23 02:38:10 +02:00
leander and Claude Opus 5.5
051a9788c4
insert pending verification atomically with on conflict
...
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com >
2026-10-23 02:38:02 +02:00
leander and Claude Opus 5.5
ed66636c34
send verification notification with pg_notify instead of f-string NOTIFY
...
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com >
2026-10-23 02:37:19 +02:00
leander and Claude Opus 5.5
5537c7a343
claim verification state atomically and reject expired ones
...
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com >
2026-10-23 02:37:12 +02:00
leander and Claude Opus 5.5
621239c5a5
store verification expiry as timestamptz
...
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com >
2026-10-23 02:36:58 +02:00
leander and Claude Opus 5.5
f82b3175a9
delete expired verifications in a single query
...
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com >
2026-10-23 02:33:31 +02:00
leander and Claude Opus 5.5
90f34f9fde
add command for listing roles connected to galtinn groups
...
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com >
2026-10-23 02:12:33 +02:00
leander
ef6663b855
revert bad ai logic and replace with bad human logic
2026-09-17 21:38:45 +02:00
leander
23582da034
have an agent rewrite the group fetching logic
...
my stupid brain does not understand how this changes anything but fuck it we ball. I am too lazy to test this locally so here I go comitting it
2026-09-17 21:20:53 +02:00
leander
c7711c579a
specify http error codes when verification server fails
2026-09-17 20:37:50 +02:00
leander
4f8f699893
log if role assignment fails
2026-09-17 20:33:08 +02:00
leander
c4f4373dbd
add checks for ghost roles and role assignment permission errors
...
some ai agent made this. I don't think this will fix any of our core issues but it is not an unreasonable check to do anyway
2026-09-17 20:32:42 +02:00
leander
003b956a90
add more data to log message
2026-09-17 20:26:46 +02:00
leander
c5c36ac464
verify payload data sent over db listener
2026-09-17 20:16:00 +02:00
leander
26c01b470f
add verification server setup guide
2024-10-11 16:22:18 +02:00
leander
f2d09e54f9
remove deprecated version number
2024-10-11 16:16:18 +02:00
leander
d2210a2520
translate to english
2024-10-11 16:15:53 +02:00
leander
3bae17f4f1
refer to new docker compose command
2024-10-11 16:15:07 +02:00
leander
109d9cb611
improve phrasing
2024-10-11 16:14:27 +02:00
leander
975261175e
improve title
2024-10-11 16:13:13 +02:00
leander
78f326de55
refer to new docker compose command in docs
2024-10-11 16:12:16 +02:00
leander
2afd2344f4
make group profiles optional
...
because some groups apparently lack profiles >:
2024-09-09 19:33:36 +02:00
Leander Furumo
98006a51dc
stop db event listener on cog unload
2024-05-08 00:05:14 +02:00
Leander Furumo
100aaf26ba
convert static discord ids from .env to int
2024-04-29 23:45:02 +02:00
Leander Furumo
90fc0c37a1
remove redundant models and fields
2024-04-22 02:43:15 +02:00
Leander Furumo
11a8b33285
log at root level instead of 'discord' level
2024-04-22 02:41:22 +02:00
Leander Furumo
1762125788
change return type of fetch_all_galtinn_roles
...
since member and volunteer roles are fetches independently of api we need to return them regardless of group status.
2024-04-22 02:39:19 +02:00
Leander Furumo
b93b055a06
make utc datetime now naive
2024-04-22 02:32:37 +02:00
Leander Furumo
4c4a35d4f7
log completion of db listener trigger function
2024-04-22 02:08:48 +02:00
Leander Furumo
93bd59e62a
replace deprecated datetime.utcnow
2024-04-22 02:06:32 +02:00
Leander Furumo
4c6fb019fe
log roles to add and remove before attempting to do so
2024-04-22 02:03:51 +02:00
Leander Furumo
aecddf7708
make sure member and volunteer roles are removed, even when a user does not have any groups
2024-04-22 02:02:19 +02:00
Leander Furumo
b944550bd6
make active_member_card registration date optional
2024-04-22 01:55:55 +02:00
Leander Furumo
83a1a2966e
log roles set instead role setter function instead of outside
2024-04-22 01:43:41 +02:00
Leander Furumo
8b5ac02b0f
fix active_member_card type
2024-04-22 01:42:39 +02:00
Leander Furumo
616f987924
make membership order and end date optional
2024-04-22 01:40:04 +02:00
Leander Furumo
a7f59bc89a
include contact info in error page and remove contact from error messages
2024-04-22 01:15:07 +02:00
Leander Furumo
022e0ebce2
include contact info & rephrase success message
2024-04-22 01:14:31 +02:00
LBlend
d70f6afb23
set emoji globally
2024-04-21 16:45:17 +02:00
Leander Furumo
60b34cc40f
replace buggy galtinn delete confirmation button with no confirmation, for now
2024-04-20 13:57:47 +02:00
Leander Furumo
ebca55efed
fetch discord profiles instead of users in galtinn register
2024-04-20 13:57:02 +02:00
Leander Furumo
c88e71fdb5
rewrite galtinn membership check loop using new util functions
2024-04-20 13:56:04 +02:00
Leander Furumo
6a2d8106d6
rewrite galtinn db listener using new util functions
2024-04-20 13:55:25 +02:00
Leander Furumo
ce02c80455
add various galtinn util functions
2024-04-20 13:54:52 +02:00