summary refs log tree commit diff
path: root/src/api (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Add well-known routesRory&2025-11-221-0/+36
|
* fixesMathMan052025-11-191-1/+6
|
* add missing awaitsMathMan052025-11-191-2/+2
|
* fix mentions issuesMathMan052025-11-191-6/+33
|
* Merge branch 'master' into webhookFixCyber2025-11-194-18/+42
|\
| * Merge branch 'master' into readStatesCyber2025-11-191-4/+7
| |\
| * | implement mention_countMathMan052025-11-184-18/+42
| | |
* | | correctly check queryMathMan052025-11-191-1/+1
| | |
* | | rearange errorsMathMan052025-11-191-8/+9
| | |
* | | fixesMathMan052025-11-191-44/+17
| | |
* | | Merge branch 'webhookFix' of https://github.com/MathMan05/server into webhookFixMathMan052025-11-191-4/+7
|\ \ \
| * \ \ Merge branch 'master' into webhookFixCyber2025-11-191-4/+7
| |\ \ \ | | | |/ | | |/|
| | * | more fixMathMan052025-11-181-1/+7
| | | |
| | * | I am an idiot, it wasn't backwardsMathMan052025-11-181-1/+1
| | | |
| | * | fixMathMan052025-11-181-5/+2
| | |/
* | | get rid of logMathMan052025-11-191-1/+0
| | |
* | | some fixesMathMan052025-11-191-10/+32
|/ /
* / make not wait work correctlyMathMan052025-11-181-46/+20
|/
* Merge branch 'master' into DecCyber2025-11-181-0/+1
|\
| * no bots for youMathMan052025-11-181-0/+1
| |
* | member count fixesMathMan052025-11-183-19/+7
|/
* Merge branch 'master' into pingFixCyber2025-11-181-1/+4
|\
| * update last message id in more placesMathMan052025-11-171-1/+4
| | | | | | | | This update should update the last message id in the greet message endpoint and the Member creation message.
* | rename varriableMathMan052025-11-171-1/+1
| |
* | add spacingMathMan052025-11-171-0/+1
| |
* | fix ping error bugMathMan052025-11-171-2/+17
|/
* fixes slight bug with joining guilds via IDMathMan052025-11-171-30/+10
|
* fix full user object being exposedMathMan052025-10-306-141/+53
|
* fix: check for duplicated component IDsCyberL12025-10-281-1/+22
|
* chore: remove solved TODO commentCyberL12025-10-281-1/+0
|
* fix: check if components are beetwen 1 to 5 in each rowCyberL12025-10-281-1/+21
|
* fix: send `options` only for type 1CyberL12025-10-231-2/+2
|
* fix: complete `applicationCommandSendable`CyberL12025-10-231-5/+17
|
* fix dming blocked usersPuyodead12025-10-221-0/+22
|
* reduce a littleMathMan052025-10-221-5/+4
|
* I think this fixes bugsMathMan052025-10-221-6/+7
|
* Revert "fix: no sense it doing it twice when it could be done in one query"Cyber2025-10-221-3/+9
|
* fix: no sense it doing it twice when it could be done in one queryCyberL12025-10-221-9/+3
|
* fix: trim moreCyberL12025-10-224-9/+12
|
* fix: add `author` to interaction messageCyberL12025-10-221-1/+1
|
* fix: add `BulkApplicationCommandCreateSchema`CyberL12025-10-222-2/+2
|
* fix: components on messageCyberL12025-10-221-0/+1
|
* fix: delete bot user when application is deletedCyberL12025-10-221-38/+14
|
* fix: get all application commandsCyberL12025-10-211-3/+12
|
* add fingerprint endpointdoesnm2025-10-202-0/+30
|
* fix: remove commands not present in arrayCyberL12025-10-202-0/+21
|
* fix: trim command `name` and `description` fieldsCyberL12025-10-204-24/+24
|
* fix: don't emit ephemeral interaction replies to channel, but only to user ↵CyberL12025-10-201-1/+1
| | | | instead
* fix: interaction type checkCyberL12025-10-191-1/+1
|
* fix: interaction `attachment_size_limit` fieldCyberL12025-10-191-2/+2
|
* fix: interaction `app_permissions` fieldCyberL12025-10-191-2/+3
|
* fix: interaction contextCyberL12025-10-191-1/+7
|
* fix: interaction callbackCyberL12025-10-193-19/+59
|
* Synchronously save automod messageRory&2025-10-191-39/+25
|
* Use message.createRory&2025-10-191-0/+1
|
* Use save operator rather than raw insert maybe?Rory&2025-10-191-1/+1
|
* More env settings to tune down log noiseRory&2025-10-192-8/+10
|
* Helper to create valid messagesRory&2025-10-191-1/+3
|
* fixRory&2025-10-181-1/+1
|
* Automod mayhaps?Rory&2025-10-181-7/+84
|
* fix: typo, additional `m` lolCyberL12025-10-181-1/+1
|
* feat: interaction repliesCyberL12025-10-181-4/+83
|
* fix: pass the command type to pending interactions mapCyberL12025-10-181-1/+2
|
* fix: comment out the route for interactions callbackCyberL12025-10-181-1/+1
|
* Fix relationshipsRory&2025-10-181-16/+7
|
* fix: move types to schemaCyberL12025-10-181-4/+3
|
* fix: add `user` object on `interaction` and `interaction_metadata` for messagesCyberL12025-10-181-8/+16
|
* Partial usersetting update schemaRory&2025-10-181-4/+5
|
* feat: interactions (incomplete)CyberL12025-10-173-7/+175
|
* fix: do the same for applicaiton_commandsCyberL12025-10-171-1/+17
|
* fix: send only needed fieldsCyberL12025-10-171-3/+17
|
* feat: add application command index route for guildsCyberL12025-10-171-0/+39
|
* fix: check if an application is in a guildCyberL12025-10-172-8/+38
|
* feat: add endpoints for managing application commandsCyberL12025-10-174-0/+610
|
* games/detectableRory&2025-10-171-0/+52
|
* Marshall ajverrorsRory&2025-10-171-1/+3
|
* Include full AJV error on apiRory&2025-10-171-1/+1
|
* Local changesRory&2025-10-161-2/+14
|
* Implement applications/@meRory&2025-10-161-0/+115
|
* More schema work, moved most stuff from entities to schemas, though messyRory&2025-10-1519-42/+22
|
* Reorganise schemas a little bitRory&2025-10-1579-127/+103
|
* Schema fixes, api bug fixRory&2025-10-141-2/+2
|
* app_id -> application_idRory&2025-10-141-0/+0
|
* Return defaults for missing {proto-,}settingsRory&2025-10-113-13/+15
|
* More path fixesRory&2025-10-112-2/+2
|
* Update more path variablesRory&2025-10-114-14/+14
|
* Update path variablesRory&2025-10-1113-39/+39
|
* fix pathRory&2025-10-071-2/+2
|
* API: expose schemas.json and openapi.jsonRory&2025-10-071-50/+18
|
* Try to fix sending messages with discord-goRory&2025-10-061-0/+1
|
* Merge remote-tracking branch 'origin/dev/admin-api'Rory&2025-10-051-0/+4
|\
| * Local changesEmma [it/its]@Rory&2025-10-051-0/+4
| |
* | Fix missing return statementRory&2025-10-041-1/+2
|/
* Fix importRory&2025-10-041-2/+2
|
* Templates, maybe?Rory&2025-10-041-99/+46
|
* Add sticker limitRory&2025-10-041-0/+12
|
* Unkown -> unkown (typo fix)Rory&2025-10-041-1/+1
|
* Clean up array extensionsRory&2025-10-044-10/+9
|
* Add dotnet-ish Random classRory&2025-10-041-2/+2
|
* Drop dependency on missing-native-js-functionsRory&2025-10-043-3/+0
|
* Move reporting menu to todoRory&2025-10-041-1/+2
|
* Fix ignored request schemasRory&2025-10-042-1/+47
|
* fix: getting invites for a channelCyberL12025-10-021-16/+3
|
* Log schema name on errorRory&2025-10-011-1/+1
|
* Safety hub workRory&2025-10-012-3/+61
|
* Implement fetching mutual friendsRory&2025-09-301-117/+124
|
* Pass mergeParams: true to new router calls due to express behavior changeRory&2025-09-30171-171/+171
|
* Clean up unused importsRory&2025-09-309-19/+3
|
* Silence, dotenv, we dont want your adsRory&2025-09-292-2/+3
|
* Drop @sentry/node (Sentry support) - untested and unusedRory&2025-09-293-14/+0
|
* No error when message not foundRory&2025-09-292-2/+2
|
* Also filter expired invites when returning invite listRory&2025-09-291-1/+1
|
* Delete expired invitesRory&2025-09-291-0/+6
|
* Add fetching guild profilesRory&2025-09-291-0/+65
|
* Maybe this tieRory&2025-09-292-1/+5
|
* Include attachmentsRory&2025-09-291-2/+5
|
* Polyfill referenced messageRory&2025-09-291-0/+12
|
* More relationsRory&2025-09-292-66/+20
|
* Add author and mentions relation to fetching messagesRory&2025-09-291-0/+2
|
* Actually set the referenced_message relation on new messagesRory&2025-09-291-1/+8
|
* Include referenced_message relation on GET /channel/.../messagesRory&2025-09-291-0/+1
|
* Null coalescing for file idRory&2025-09-291-3/+2
|
* Use default ID on file upload requestsRory&2025-09-291-0/+14
|
* Make cloud uploads workRory&2025-09-293-132/+104
|
* Logging of empty messagesRory&2025-09-292-2/+3
|
* meow???Rory&2025-09-292-2/+2
|
* Log validation errorsRory&2025-09-291-0/+5
|
* Try to handle new attachment style in message handlerRory&2025-09-291-0/+31
|
* Update message schema to handle cloud attachmentsRory&2025-09-291-0/+1
|
* Implment deleting cloud attachmentsRory&2025-09-291-0/+35
|
* Fix upload filenameRory&2025-09-291-1/+1
|
* Add first half of cloud attachment uploadsRory&2025-09-295-7/+107
|
* Fix schema for preload messagesRory&2025-09-291-3/+1
|
* Implement greetingRory&2025-09-293-1/+106
|
* Implement fetching DM messages by user IDRory&2025-09-291-0/+54
|
* Implement message preloadingRory&2025-09-291-0/+72
|
* Permissions: less magic numbersRory&2025-09-291-11/+3
|
* Add endpoint implementationsRory&2025-09-294-0/+178
|
* Screw off, telemetryRory&2025-09-291-0/+38
|
* Colorful rolesRory&2025-09-291-1/+6
|
* Do settings versioningRory&2025-09-292-0/+10
|
* Oops, actually send the events to a user...Rory&2025-09-292-0/+2
|
* Emit USER_SETTINGS_PROTO_UPDATERory&2025-09-292-0/+36
|
* Merge in json representation of settings protosRory&2025-09-292-8/+38
|
* Release -> ClientReleaseRory&2025-09-293-4/+12
|
* Setting protos supportRory&2025-09-292-0/+374
|
* Update copyright date in pin endpointsRory&2025-09-292-2/+2
|
* fix: don't set order for counting queriesCyberL12025-09-292-2/+0
|
* fix: set DESC orderCyberL12025-09-292-0/+4
|
* refactor: don't use query builderCyberL12025-09-291-7/+3
|
* refactor: don't use query builderCyberL12025-09-292-21/+14
|
* refactor: add `pinned` getter to `Message` entityCyberL12025-09-292-2/+2
|
* refactor: use `pinned_at` to check if message is pinnnedCyberL12025-09-294-24/+35
|
* fix: getting message pinssCyberL12025-09-291-2/+11
|
* fix stupid bugMathMan052025-09-291-0/+2
|
* prevent re-verifying emailPuyodead12025-09-051-1/+5
|
* fixes and minor changes for email stuffPuyodead12025-09-051-1/+1
|
* fix an issue with NO_AUTHENTICATE routesPuyodead12025-09-051-6/+17
|
* More cleanupRory&2025-07-272-6/+11
|
* WIP logo/terminal stuffEmma [it/its]@Rory&2025-07-271-2/+2
|
* Implement CRUD for automodEmma [it/its]@Rory&2025-07-271-0/+147
|
* add types to the ban api response objectsdank0742025-07-211-13/+24
|
* update guild bans apidank0742025-07-211-7/+74
|
* Merge pull request #1305 from ZaneH/feat/handle-github-webhookPuyodead12025-07-123-147/+714
|\ | | | | Implement GitHub-compatible webhook
| * Proxy avatar URL + adjust event logicZane Helton2025-06-291-17/+132
| | | | | | | | | | | | | | | | 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.
| * Make tsc happy when using strings as Date in embedZane Helton2025-06-292-2/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * Refactor `/github` endpoint into it's own fileZane Helton2025-06-293-561/+577
| |
| * Capitalize `ref_type` when using in embedZane Helton2025-06-291-1/+2
| | | | | | | | | | | | | | | | | | 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
| * Implement webhook handler for GitHubZane Helton2025-06-291-136/+551
| | | | | | | | | | | | 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.
* | Modern pins endpointsRory&2025-07-082-0/+195
| |
* | Add emoji source endpointRory&2025-07-071-0/+93
| |
* | Add endpoint to get account standingRory&2025-07-071-0/+58
| |
* | PrettierRory&2025-07-063-27/+54
| |
* | Fix forgotten function signature changesRory&2025-07-062-4/+10
| |
* | Make IP/user-agent validation in CDN workRory&2025-07-063-7/+22
| |
* | sign attachment on sending messageEmma [it/its]@Rory&2025-07-061-1/+1
| |
* | Sign media per userEmma [it/its]@Rory&2025-07-061-2/+3
| |
* | Add options to erquire IP or User Agent to access CDNEmma [it/its]@Rory&2025-07-062-3/+3
| |
* | Fix typeorm queries no longer allowing empty where clausesEmma [it/its]@Rory&2025-07-061-1/+1
| |
* | Update some dependencies, fix nixEmma [it/its]@Rory&2025-07-023-4/+7
| |
* | Fix the fixMathMan052025-07-021-1/+1
| | | | | | this should actually be what's intended
* | Check for old password when setting newMathMan052025-07-021-1/+1
| | | | | | Checks for password
* | Fix the creation of guilds from templatesZane Helton2025-06-293-23/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Set `premium_tier` to 0 when creating guild from templateZane Helton2025-06-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Await guild creation to fix a race conditionZane Helton2025-06-291-19/+18
| | | | | | | | | | | | | | `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.
* | Fix PATCH Template route implementationZane Helton2025-06-291-6/+8
| | | | | | | | | | | | | | | | 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
* | Add OP to message.mentions when replied toZane Helton2025-06-291-1/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Preserve reactions when a message is editedZane Helton2025-06-291-1/+3
|/ | | | Resolves #1241
* Properly filter existing embed linksZane Helton2025-06-291-8/+2
| | | | | | | | In a previous PR, I was checking if the `.url` property existed, the correct fix is to remove any embed that isn't a rich embed type (non-link). See also: #1296
* Start fresh when updating embeds for linksZane Helton2025-06-281-8/+3
| | | | | | | | | | In a previous commit I was attempting to be clever by only replacing/removing embeds if necessary. This not only made the logic more confusing but introduced a bug that would allow for orphaned embeds when updating the search params of a URL. This commit will remove all embeds that have a `.url` property and start fresh. This simplifies the code and eliminates the aforementioned bug.
* Fix various issues with embeds on message updatesZane Helton2025-06-281-14/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | The `postHandleMessage` function is parsing links and adding them to the EmbedCache table if necessary. In the previous implementation, message updates would push to the embeds unconditionally. This commit parses links from the message and: 1. Normalizes the URLs - Useful for deduplicating similar URLs 2. Remove embeds with matching normalized URLs - Leaves all embeds except for ones with a `.url` property matching the updated message - This allows embeds to be re-ordered if the URL is moved 3. If no normalized URLs are found, remove all embeds 4. Take the deduplicated + normalized URLs and add an embed to the message and insert into the EmbedCache table (if necessary) This enables: 1. Embeds to be re-ordered by re-ordering links 2. Embeds to be removed by removing links and fixes: 1. Duplicate embeds being attached to a message when edited
* Add validation to date_of_birth registration fieldZane Helton2025-06-281-2/+16
| | | | Resolves: #1020
* add webrtc support (#1284)dank0742025-06-221-1/+1
| | | | Co-authored-by: MaddyUnderStars <46743919+MaddyUnderStars@users.noreply.github.com>
* send the real indexMathMan052025-05-281-1/+1
|
* code relies on things done in a certain orderMathMan052025-05-281-54/+50
| | | | This makes sure that the code gets done in the order that is expected
* remove missed logMathMan052025-05-281-1/+0
|
* sort array to make algorithm happyMathMan052025-05-281-1/+20
|
* fix another stupid bugMathMan052025-05-281-1/+1
|
* don't set possition if sentMathMan052025-05-281-1/+1
|
* remove logsMathMan052025-05-281-2/+0
|
* delete the null eaterMathMan052025-05-281-2/+1
|
* channel is nullable fixesMathMan052025-05-281-12/+21
|
* forgot to test on rebuildMathMan052025-05-281-0/+2
|
* fix moving channelsMathMan052025-05-281-1/+1
|
* Implement signed cdn urlsPuyodead12025-05-032-8/+59
|
* add `author` to query in pins APIdank0742025-04-091-0/+2
|
* PrettierEmma [it/its]@Rory&2025-04-093-9/+11
|
* Fix dependenciesEmma [it/its]@Rory&2025-04-091-2/+4
|
* stupid fixMathMan052025-04-031-1/+1
|
* fix password reset bugMathMan052025-04-031-1/+1
| | | Not sure if this'll work, but made a pull so y'all could see the issue
* Validate Name for webhooks enforced moreroot2025-03-252-62/+3
|
* Added can_recover_account value to /api/policies/instance/configroot2025-03-251-0/+3
|
* Added better user configuration and removed extra loggingroot2025-03-251-10/+10
|
* Merge branch 'spacebarchat:master' into masterMunchy2025-03-241-0/+1
|\
| * acatually fix the embed issueMathMan052025-03-231-0/+1
| | | | | | This one added the line in the right spot, sorry about the previous one lol
* | Updated error message for empty webhook update bodyroot2025-03-242-2/+2
| |
* | Added Name Validation utility functionroot2025-03-243-32/+79
| |
* | Merge branch 'master' of https://github.com/spacebarchat/server into ↵root2025-03-232-4/+8
|\| | | | | | | update_webhooks
| * Merge pull request #1205 from DEVTomatoCake/feat/dont-send-x-powered-byPuyodead12025-03-231-3/+4
| |\ | | | | | | Stop sending X-Powered-By & use API CORS + BodyParser middlewares in CDN
| | * Stop sending X-Powered-By & share CORS/BodyParserTomatoCake2024-08-311-3/+4
| | |
| * | Update index.tsMathMan052025-03-231-1/+4
| | |
| * | fix minor bugMathMan052025-03-221-1/+1
| | |
* | | Fixed errors in authorization for webhooks with tokensroot2025-03-234-8/+341
|/ /
* | Added in date wrap on generate-registration-tokens.tsroot2025-03-191-2/+4
| |
* | implement hubs routesPuyodead12025-01-073-0/+198
| |
* | run prettierdank0742024-11-197-11/+10
| |
* | Merge branch 'master' into fix/user-profile-colorsCyber2024-11-142-2/+0
|\ \
| * | turn off eslint rules causing issuesdank0742024-11-132-2/+0
| | |
* | | fix: return user profile theme colors as numbersCyberL12024-11-121-2/+2
|/ /
* | Add express trustedProxy supportEmma [it/its]@Rory&2024-10-301-0/+4
| |
* | Fix the broken delete APIMathMan052024-10-291-1/+1
| |
* | Fix module resolution when $CWD != .Emma [it/its]@Rory&2024-10-281-1/+2
| |
* | Update some patches, switch to node-fetch-commonjs, more updatesEmma [it/its]@Rory&2024-10-289-18/+48
| |
* | fix: self nick change responseCyber2024-09-031-2/+10
| |
* | Fix uploading of emojisTomatoCake2024-09-021-2/+2
| |
* | Add more application propertiesTomatoCake2024-08-311-3/+22
|/
* Enforce RegEx no auth routes startTomatoCake2024-08-301-4/+4
|
* Fix HEAD requests for no authorization routesTomatoCake2024-08-301-4/+10
|
* fix: display pinned message authorCyber2024-08-281-0/+1
|
* Run prettierTomatoCake2024-08-252-2/+7
|
* Remove auth requirement & fix image pathTomatoCake2024-08-252-2/+4
|
* Run prettierTomatoCake2024-08-242-11/+8
|
* Add method to NO_AUTHORIZATION_ROUTESTomatoCake2024-08-242-32/+31
|
* Listing & creation of Developer Portal teamsTomatoCake2024-08-241-7/+77
|
* Fix updating vanity URL & retrieving widget.jsonTomatoCake2024-08-232-14/+12
|
* Run prettierTomatoCake2024-08-221-1/+1
|
* Merge branch 'master' of https://github.com/DEVTomatoCake/spacebar-server ↵TomatoCake2024-08-2211-93/+306
|\ | | | | | | into fix/guild-create-response-schema
| * Merge pull request #1189 from greysilly7/dev/bodyparserMadeline2024-08-221-2/+22
| |\
| | * feat (bodyparser): do proper errorsScott Gould2024-08-191-2/+22
| | |
| * | Merge branch 'master' into fix/widget.json-channel-ordering-deleted-channelsMadeline2024-08-227-68/+249
| |\ \