1
0
mirror of https://github.com/hrfee/jfa-go.git synced 2024-10-31 23:40:11 +00:00
Commit Graph

23 Commits

Author SHA1 Message Date
e4a7172517
messages: assign tokens to jf users on userpage
pins generated on the user page are assigned to that user, no other
jellyifn user can verify them.
2023-06-21 18:26:08 +01:00
3747eaa3a7
messages: refactor dc/tg, fix tg
less external access to Discord/TelegramDaemon internals, will be easier
to keep user/admin-side uses functioning similarly. Also changed their
internal token stores to use a map, and store an expiry. verifiedTokens
is also now a map in telegram. Also fixed issue where token wasn't being
deleted after use on the user page.
2023-06-21 18:02:33 +01:00
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
094f7cea94
discord: use placeholder if guild icon not available
also centers the invite on the form/user discord modal.
2023-06-19 17:48:24 +01:00
48403ce940
discord: proper support for discriminator-less
names with no discriminator are shown as @username, and search works
with the @ too. Also bumped go version to 1.20, since it was stuck on
1.16 and i felt like trying generics (in an ugly way).
2023-06-12 16:32:40 +01:00
ad40d7d8a9
fix bugs with restarts/interrupts
The password reset daemon wasn't being closed on restarts, so an extra
pwr would be sent w/ every restart. Restarts & Interrupts (Ctrl-C)
rarely worked, as there were multiple listeners to the "RESTART"
channel, and I didn't know the message was consumed by whoever got it
first, meaning if the main thread didn't get it first, the app wouldn't
quit. Listeners are now registered, and the restart message is
re-broadcasted until everyone's got it.

Fixes #264
2023-06-11 19:50:50 +01:00
0674e04ee1
go module update/tidy 2023-02-20 10:47:54 +00:00
4b02960fd1
form: add captcha regen button
lots of false negatives so this is a solution for now.

Also the registering of each discord command is now logged for debugging
purposes.
2022-01-26 22:14:16 +00:00
15e5564b12
discord: add/move to slash commands
the version of the discord library with support for this isn't
necessarily stable, so normal ! commands will still be available. The
user is no longer DMed for the PIN, instead they type /pin <PIN>.
2022-01-26 21:47:02 +00:00
8fd097836f
discord: send in-channel reply to !start 2022-01-14 17:26:19 +00:00
25a1ca5a9f
bots: fix language selection
you may have to re-apply your language choice.
2022-01-14 17:01:42 +00:00
32af107699
discord: add role to user on signup
This requires an extra permission, so you'll have to modify your bot
settings, kick it from your server and re-add it for this to work. The
role you select must also be lower in hierarchy than the bot's group.
2022-01-13 22:34:52 +00:00
86ef665b12
Discord: Try to avoid more race conditions
also added RACE=on to Makefile to enable go's race detector.
2021-05-23 22:26:56 +01:00
1f9af8df89
Discord: Add option to provide server invite
When enabled, a temporary one-use invite is created and shown to the
user on the account creation form.
2021-05-23 19:50:03 +01:00
0676b6c41f
Discord: Display channel on account creation form 2021-05-23 17:31:20 +01:00
ce8cdced4d
Discord: Fix GetUsers, add invite messages
The "Send to" box on the invite tab now accepts username#discriminator,
and a search icon has been added which opens a search window similar to
the one on the accounts tab. DiscordDaemon.GetUsers was also very broken
and wouldn't work with full username#discriminator, that's been fixed.
2021-05-23 16:16:31 +01:00
24fa841c0d
Discord: Wait for non-nil pointer to bot data
While testing others things, I had quite a few nil pointer dereference
errors from accessing bot data right after initializing. A for loop now
waits until the first of the pointers is non-nil, which should
hopefully avoid crashes.
2021-05-23 01:09:03 +01:00
9fac79b1f0
Discord: Add users via accounts tab
Doesn't require a PIN like Telegram, as we can access a list of guild
users with the GuildMembers intent set. This has to be enabled under
Bot > Priviliged Gateway intents on the developer portal.
2021-05-22 21:42:15 +01:00
591e3c5ca1
Discord: embed images
![alt](image link) is now converted to an image embed.
2021-05-22 15:32:51 +01:00
3bf722c5fe
Discord: send links as embeds
Kind of janky but works. This kind of messes up the layout if you write
links in-line.
2021-05-21 21:59:50 +01:00
f8f5f35cc1
PIN verification, notifications, multiple notif providers
Discord, Email & Telegram can be enabled, although email is always
enabled right now (will fix). Also apparently markdown hyperlinks don't
work in Discord, eventually will implement something to convert them to
embeds.
2021-05-21 21:35:25 +01:00
22bba922f9
Discord: Add !lang command 2021-05-18 18:41:42 +01:00
d928df7ab2
Discord: Start bot, add !start and pin validity check
The bot should be created by the admin and added to a discord server
mutual to the intended new user(s). On !start in the server,
communication is moved to DMs. Currently !start works, and validity of a
given PIN is checked although nothing it done with this yet.
2021-05-17 23:42:33 +01:00