470 Commits

Author SHA1 Message Date
Rory&
387722d017 Add endpoint implementations 2025-09-29 18:38:06 +02:00
Rory&
8b946ac41d Screw off, telemetry 2025-09-29 18:38:06 +02:00
Rory&
528662446c Colorful roles 2025-09-29 18:38:06 +02:00
Rory&
18e752a457 Do settings versioning 2025-09-29 18:38:06 +02:00
Rory&
b212cbbea1 Oops, actually send the events to a user... 2025-09-29 18:38:06 +02:00
Rory&
5466de1c02 Emit USER_SETTINGS_PROTO_UPDATE 2025-09-29 18:38:06 +02:00
Rory&
b62fc8aca8 Merge in json representation of settings protos 2025-09-29 18:38:06 +02:00
Rory&
93ef08320e Release -> ClientRelease 2025-09-29 18:38:06 +02:00
Rory&
5e3080d72f Setting protos support 2025-09-29 18:38:06 +02:00
Rory&
09147ae51c Update copyright date in pin endpoints 2025-09-29 18:38:06 +02:00
CyberL1
3e93ad8a87 fix: don't set order for counting queries 2025-09-29 18:32:21 +02:00
CyberL1
6bf4109465 fix: set DESC order 2025-09-29 18:32:21 +02:00
CyberL1
8e18a642fe refactor: don't use query builder 2025-09-29 18:32:21 +02:00
CyberL1
29c4a6695c refactor: don't use query builder 2025-09-29 18:32:21 +02:00
CyberL1
5c332ae763 refactor: add pinned getter to Message entity 2025-09-29 18:32:21 +02:00
CyberL1
dc3a85f078 refactor: use pinned_at to check if message is pinnned 2025-09-29 18:32:21 +02:00
CyberL1
b8b461f0db fix: getting message pinss 2025-09-29 18:32:21 +02:00
MathMan05
b461da9b8f fix stupid bug 2025-09-29 00:08:23 +02:00
Puyodead1
6ff8eec722
prevent re-verifying email 2025-09-05 18:35:50 -04:00
Puyodead1
b8b9b038cf
fixes and minor changes for email stuff 2025-09-05 18:03:59 -04:00
Puyodead1
5fafb6d156
fix an issue with NO_AUTHENTICATE routes 2025-09-05 17:47:42 -04:00
Rory&
9d314cd995 More cleanup 2025-07-27 15:49:37 +02:00
Emma [it/its]@Rory&
bd81cde977 WIP logo/terminal stuff 2025-07-27 15:49:37 +02:00
Emma [it/its]@Rory&
3f7d26118d Implement CRUD for automod 2025-07-27 15:49:37 +02:00
dank074
7261766459 add types to the ban api response objects 2025-07-21 16:05:14 -05:00
dank074
3c0efd17bc update guild bans api 2025-07-21 00:46:14 -05:00
Puyodead1
9347a3ec6f
Merge pull request #1305 from ZaneH/feat/handle-github-webhook
Implement GitHub-compatible webhook
2025-07-12 12:56:00 -04:00
Rory&
d58414c9c5 Modern pins endpoints 2025-07-08 22:45:57 +02:00
Rory&
cb0443821e Add emoji source endpoint 2025-07-07 21:59:25 +02:00
Rory&
5205ccecd5 Add endpoint to get account standing 2025-07-07 20:40:38 +02:00
Rory&
b590482bfb Prettier 2025-07-06 18:03:17 +02:00
Rory&
9e4a769d69 Fix forgotten function signature changes 2025-07-06 18:03:17 +02:00
Rory&
2e196573ea Make IP/user-agent validation in CDN work 2025-07-06 18:03:17 +02:00
Emma [it/its]@Rory&
0fcdbd2831 sign attachment on sending message 2025-07-06 18:03:17 +02:00
Emma [it/its]@Rory&
387cef269a Sign media per user 2025-07-06 18:03:17 +02:00
Emma [it/its]@Rory&
0e0da6d722 Add options to erquire IP or User Agent to access CDN 2025-07-06 18:03:17 +02:00
Emma [it/its]@Rory&
3e549dae28 Fix typeorm queries no longer allowing empty where clauses 2025-07-06 09:18:22 +02:00
Emma [it/its]@Rory&
fca7953a51 Update some dependencies, fix nix 2025-07-02 15:54:23 +02:00
MathMan05
6ab26cb3ff Fix the fix
this should actually be what's intended
2025-07-02 09:21:24 +10:00
MathMan05
76857bdcfb Check for old password when setting new
Checks for password
2025-07-02 09:21:24 +10:00
Zane Helton
ed85ba3dc2 Proxy avatar URL + adjust event logic
I've proxied the URLs with `getProxyUrl` specifying the size as 80x80.

I've also adjusted the event logic so that unstarring doesn't trigger an
alert and I've disabled the 'watch' event because Discord doesn't use
it either.
2025-06-29 12:17:24 -04:00
Zane Helton
590331518c Make tsc happy when using strings as Date in embed
Validation on embeds has interesting behavior. Embeds have a `timestamp`
property that is of type `Date`. However when providing a Date,
`WebhookExecuteSchema` silently ends the operation.

The resolution was to use strings and to annotate them with `//
@ts-expect-error`. This was not my first choice, but it was the best
option I saw.

The other option is to allow `Embeds` to pass strings as a timestamp but
I'd want a second opinion before making that change.
2025-06-29 11:34:57 -04:00
Zane Helton
9143c1d408 Refactor /github endpoint into it's own file 2025-06-29 10:46:16 -04:00
Zane Helton
82642d0e97 Capitalize ref_type when using in embed
The GitHub API provides `ref_type` as lowercase. For consistency, this
adds a utility function and makes use of it when formatting the `create`
event from GitHub.

tag => Tag
branch => Branch
2025-06-29 03:56:01 -04:00
Zane Helton
77dd481742 Implement webhook handler for GitHub
I've created a middleware that runs when `/github` is appended to the
webhook URL. The middleware parses the GitHub webhook and turns it into
usable embeds.
2025-06-29 03:18:43 -04:00
Zane Helton
33fde3bc4a Fix the creation of guilds from templates
The biggest hold-up was missing fields (`premium_tier`,
`welcome_screen`, etc.) but it looks like someone has provided a
helpful function called `createGuild(...)` to provide sensible default
values.

This commit fixes the errors related to creating a guild from a
template. I've also refactored the code to include roles and channels in
the template.

To make sure that the @everyone role is cloned correctly, when
creating the guild from a template, we check if the role's ID
matches the template's `source_guild_id`. If it does, we set the
@everyone role to the new guild's ID.
2025-06-29 13:27:14 +10:00
Zane Helton
eec2a8ba85 Set premium_tier to 0 when creating guild from template
I think we'll need to discuss the proper way to provide default values
here. `premium_tier` for example should never be provided from the
template so it's fine going after the spread operator.

This commit still doesn't allow guilds to be created from template
because the next error is that `welcome_screen` doesn't exist. Our
options:

1. Provide default values in the ORM
2. Provide default values in the guild creation process
3. Throw an error if the template is missing values

Resolves: #1283 but creates a new issue
2025-06-29 13:27:14 +10:00
Zane Helton
ff692c19b7 Await guild creation to fix a race condition
`Promise.all(...)` runs these simultaneously, yet role depends on the
guild to be created first. This can lead to a race condition. I've
awaited role creation too because the call to `Member.addToGuild(...)`
relies on the role to be created.
2025-06-29 13:27:14 +10:00
Zane Helton
4772731a17 Fix PATCH Template route implementation
The previous PATCH implementation was creating a new template rather
than editing the existing template. This resulted in all requests
failing because it was missing more than one required field.

Resolves: #1281
2025-06-29 13:25:22 +10:00
Zane Helton
4f75919651 Add OP to message.mentions when replied to
The `message.message_reference` stores:

1. `message_id`
2. `channel_id`
3. `guild_id`

We use the `message_id` and `channel_id` to `.findOne(...)` Message, and
find the author. If the author is the same as OP, we skip (so replying
to yourself doesn't add you to the mentions array) otherwise, it adds
the author_id to the mentions array.

Resolves: #1247
2025-06-29 09:14:58 +10:00