summary refs log tree commit diff
path: root/src/api/util (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Dont (re-/)add embeds if message has embed suppressedRory&2026-06-291-1/+4
|
* Guard embedless messages when checking for poll results, add reply testsRory&2026-06-281-1/+1
|
* refactor: add poll utilityCyberL12026-06-263-94/+140
|
* feat: mention poll authorCyberL12026-06-261-0/+7
|
* fix: ddon't turn poll end messages to reply typeCyberL12026-06-261-1/+2
|
* feat: add poll ended messagesCyberL12026-06-261-0/+93
|
* check opts not messageCyberL12026-06-251-1/+1
|
* fix: check for poll answer limitCyberL12026-06-251-0/+9
|
* fix: poll answer id should never be 0CyberL12026-06-251-1/+1
|
* refactor: group message poll checks under one ifCyberL12026-06-251-6/+10
|
* fix: assign id to poll answersCyberL12026-06-251-0/+6
|
* fix: add `expiry` field to polls in message handlingCyberL12026-06-251-0/+4
|
* Clean up some imports to make API work againRory&2026-06-172-2/+21
|
* Authentication: allow - in webhook tokenRory&2026-06-162-66/+0
|
* Move random string to Random class in extensionsRory&2026-06-163-72/+3
|
* Dont fetch roles if role id set is emptyRory&2026-06-161-1/+1
|
* Dont fetch roles for non-guild mesagesRory&2026-06-161-1/+1
|
* Move more extensions to extensionsRory&2026-06-125-45/+5
|
* Move entities to databaseRory&2026-06-124-20/+10
|
* Move database to toplevelRory&2026-06-121-3/+3
|
* Use subpath imports for lambert-server, fix openapi.jsRory&2026-06-122-2/+2
|
* Allow subpath imports, move extensions to separate moduleRory&2026-06-122-4/+3
|
* Use better permissions when handling webhook mentionsRory&2026-06-051-2/+9
|
* Log silent attachment failures for webhooksRory&2026-06-051-0/+1
|
* Break up bulk inserts for read states to avoid postgres parameter exhaustionRory&2026-05-261-10/+26
|
* Trace fillInMissingIDsRory&2026-05-261-28/+48
|
* Bulk insert missing ReadStatesRory&2026-05-261-14/+24
|
* No longer handle mention_count == null since its no longer nullableRory&2026-05-261-22/+20
|
* Use forEach rather than .map.forEachRory&2026-05-261-1/+1
|
* Add full traceRory&2026-05-261-5/+25
|
* Use sets for mention roles/usersRory&2026-05-261-20/+41
|
* Simplify some queries for handling mentionsRory&2026-05-261-11/+14
|
* User mentions: use `user_id IN (...)` rather than `user_id = ... OR user_id ↵Rory&2026-05-261-1/+1
| | | | = ...`
* Move message mention handling to separate functionRory&2026-05-261-132/+144
|
* Move email domain lists to assetsRory&2026-04-242-124132/+0
|
* eslint: yodaRory&2026-04-191-2/+2
|
* eslint: arrow-body-style=as-neededRory&2026-04-192-38/+7
|
* eslint: array callback return, no restricted importsRory&2026-04-194-9/+4
|
* Split out attachment handling from message handlerRory&2026-04-181-83/+76
|
* Attempt to set channel/message id for attachments in more placesRory&2026-04-181-0/+2
|
* handleMessage: set message id for cloud attachmentsRory&2026-04-181-0/+4
|
* Fix attachmentsRory&2026-04-182-13/+13
|
* Add media1.tenor.com explicitly as image handlerRory&2026-04-141-0/+1
|
* Make presence clear async, clean up temp session codeRory&2026-04-131-5/+1
|
* EmbedHandlers: more configuration for embeds, switch to storing all returned ↵Rory&2026-03-261-35/+60
| | | | embeds
* EmbedHandlers: use youtube handler for youtube music, use OrmUtils.mergeDeep ↵Rory&2026-03-261-5/+3
| | | | for request options
* Embeds: factor out from postMessageRory&2026-03-262-134/+168
|
* make spacebar compile again dev/emma/as-to-satisfies-gwOh642026-03-212-5/+16
|
* Message*Event: as->satisfies (WIP)Rory&2026-03-212-5/+8
|
* final pk fixesMathMan052026-03-201-1/+17
|
* make some correctionsMathMan052026-03-201-16/+23
|
* make better errorMathMan052026-03-201-1/+1
|
* invert ifMathMan052026-03-201-7/+7
|
* fixesMathMan052026-03-201-0/+1
|
* remove logMathMan052026-03-201-1/+0
|
* inline constantMathMan052026-03-201-2/+1
|
* remove logMathMan052026-03-201-1/+0
|
* more pk fixesMathMan052026-03-202-4/+5
|
* fixes for pluralkitMathMan052026-03-202-16/+49
|
* a lot of small fixesMathMan052026-03-202-1/+4
|
* remove some extrasMathMan052026-03-201-8/+0
|
* fix many bugsMathMan052026-03-201-23/+29
|
* sign 'emMathMan052026-03-201-1/+13
|
* maybe processing media?MathMan052026-03-201-13/+89
|
* v2 init workMathMan052026-03-201-29/+117
|
* move the check to the right spotMathMan052026-03-201-1/+53
|
* remove duplicate / in url regexRory&2026-03-141-1/+1
|
* Remove unused imports for non-entitiesRory&2026-03-141-1/+0
|
* Remove unnessecary continue statementsRory&2026-03-141-2/+1
|
* properly mark unused paramsRory&2026-03-141-1/+2
|
* Use plain assignment for permissions in message handlerRory&2026-03-141-2/+2
|
* Qodana: fix async warningsRory&2026-03-141-1/+1
|
* fix: fall back to undefined in message createRory&2026-03-071-0/+1
|
* [cherry/1518] Webhooks: respect thread_id parameterRory&2026-03-061-7/+18
|
* added clean_data to places after a member is created but not constructed to ↵whinis2026-02-261-0/+1
| | | | allow proper json creation.
* Fix message embeds not being nullableRory&2026-02-251-1/+1
|
* Add support for attachment:// urlsPablo Stebler2026-02-251-0/+47
| | | | Closes #1551.
* Fix read state type field - fixes #1559Rory&2026-02-251-1/+1
|
* Faster pingsRory&2026-02-231-5/+3
|
* The ChainingOperator didn't work as expected. This fixes that.whinis2026-02-181-10/+23
|
* Add some optional chaining to prevent issue with embedswhinis2026-02-181-6/+5
|
* Add Decorators to clean classes before json serialization and remove invalid ↵whinis2026-02-171-1/+1
| | | | states.
* API: request embeds in US english preferredRory&2026-02-171-1/+2
|
* API: fix youtube embedRory&2026-02-171-2/+3
|
* save channelMathMan052026-02-111-0/+1
|
* Save channel on message createRory&2026-02-081-0/+1
|
* some fixesMathMan052026-02-041-1/+1
|
* Merge remote-tracking branch 'mathium05/threadFixes'Rory&2026-02-041-28/+30
|\
| * more changesMathMan052026-02-031-28/+30
| |
* | Assert req.params type as solely string (express update)Rory&2026-02-012-2/+3
| |
* | fix: find the user instead of creating it when replying to a messageCyberL12026-01-311-3/+2
|/
* initial recipients workMathMan052026-01-281-0/+9
|
* thread API startMathMan052026-01-281-5/+15
|
* Make openapi.js work offline - still needs conditionals fixed thoughRory&2026-01-221-0/+1
|
* Deprecation: Use object-based relations for typeormRory&2025-12-192-3/+12
|
* ESLint: warn for deprecated constructsRory&2025-12-191-1/+5
|
* add TODOCyberL12025-12-181-0/+2
|
* feat: add message forwards (normal messages only)CyberL12025-12-181-2/+38
|
* Merge remote-tracking branch 'DEVTomatoCake/fix/getPublicUser-no-defaults'Rory&2025-12-171-1/+3
|\
| * Stop returning defaults when using getPublicUser()TomatoCake2024-09-011-1/+3
| |
* | lintstagedrc: regenerate schemas/openapi if schemas changedRory&2025-12-1712-1235/+1235
| |
* | Prettier u9Rory&2025-12-173-135/+35
| |
* | Prettier u5Rory&2025-12-171-7/+2
| |
* | Prettier 8Rory&2025-12-171-7/+1
| |
* | Prettier 5Rory&2025-12-171-4/+1
| |
* | Prettier 3Rory&2025-12-171-2/+1
| |
* | Remove ugly hackRory&2025-12-171-2/+2
| |
* | Cast ephemeral flag to number because lmaoRory&2025-12-171-1/+1
| |
* | Rename PRIVATE_ROUTE -> EPHEMERAL, fix typoRory&2025-12-171-2/+3
| |
* | Lower interval for cleaning up sessionsRory&2025-12-161-1/+1
| |
* | Fix bad importsRory&2025-12-161-1/+1
| |
* | Expire old sessions, update last seen on gateway heartbeatRory&2025-12-161-5/+15
| |
* | Less debug logging, more useful?Rory&2025-12-161-3/+3
| |
* | What does this even returnRory&2025-12-161-0/+4
| |
* | Session fixesRory&2025-12-161-1/+3
| |
* | More maybe un-blowing-upRory&2025-12-161-4/+13
| |
* | Refactor: Replace getIpAddress with req.ipBrajamohanDas-afk2025-12-121-29/+4
| |
* | Clean up cloud attachment debug logsRory&2025-12-041-3/+2
| |
* | Always use req.ip when calling getIpAddressRory&2025-12-031-6/+1
| |
* | Use IpDataClient in placesRory&2025-12-022-81/+5
| |
* | Fix base64 avatar stuff for webhooksRory&2025-12-011-1/+1
| |
* | Drop node-fetch-commonjs, proxy-agent as deprecatedRory&2025-12-014-9/+9
| |
* | Cut down schemas by 90%Rory&2025-11-291-1/+7
| |
* | remove unneeded logMathMan052025-11-271-1/+0
| | | | | | | | The log was meant for testing only and shouldn't've been in the final pull
* | Message handler: fix importsRory&2025-11-251-7/+5
| |
* | slight fixMathMan052025-11-251-1/+2
| |
* | Implement SlowmodeMathMan052025-11-251-2/+17
| |
* | fix :3MathMan052025-11-231-2/+1
| |
* | is it a hack if it works?MathMan052025-11-231-1/+1
| |
* | workMathMan052025-11-231-1/+12
| |
* | make interactions more normalMathMan052025-11-231-3/+5
| |
* | 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-191-1/+30
|\ \
| * \ Merge branch 'master' into readStatesCyber2025-11-191-4/+7
| |\ \
| * | | implement mention_countMathMan052025-11-181-1/+30
| | | |
* | | | 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
|/ /
* | rename varriableMathMan052025-11-171-1/+1
| |
* | add spacingMathMan052025-11-171-0/+1
| |
* | fix ping error bugMathMan052025-11-171-2/+17
| |
* | fix full user object being exposedMathMan052025-10-301-8/+10
| |
* | Include full AJV error on apiRory&2025-10-171-1/+1
| |
* | Reorganise schemas a little bitRory&2025-10-154-9/+5
| |
* | Try to fix sending messages with discord-goRory&2025-10-061-0/+1
| |
* | Clean up array extensionsRory&2025-10-041-5/+5
| |
* | Add dotnet-ish Random classRory&2025-10-041-2/+2
| |
* | Drop dependency on missing-native-js-functionsRory&2025-10-041-1/+0
| |
* | Fix ignored request schemasRory&2025-10-041-1/+7
| |
* | Log schema name on errorRory&2025-10-011-1/+1
| |
* | Drop @sentry/node (Sentry support) - untested and unusedRory&2025-09-291-7/+0
| |
* | Maybe this tieRory&2025-09-291-1/+1
| |
* | Include attachmentsRory&2025-09-291-2/+5
| |
* | More relationsRory&2025-09-291-0/+1
| |
* | Actually set the referenced_message relation on new messagesRory&2025-09-291-1/+8
| |
* | Make cloud uploads workRory&2025-09-291-129/+93
| |
* | Logging of empty messagesRory&2025-09-291-1/+2
| |
* | meow???Rory&2025-09-291-1/+1
| |
* | Log validation errorsRory&2025-09-291-0/+5
| |
* | Try to handle new attachment style in message handlerRory&2025-09-291-0/+31
| |
* | Add first half of cloud attachment uploadsRory&2025-09-291-1/+1
| |
* | Merge pull request #1305 from ZaneH/feat/handle-github-webhookPuyodead12025-07-121-0/+154
|\ \ | | | | | | Implement GitHub-compatible webhook
| * | Refactor `/github` endpoint into it's own fileZane Helton2025-06-291-0/+154
| | |
* | | Fix typeorm queries no longer allowing empty where clausesEmma [it/its]@Rory&2025-07-061-1/+1
| | |
* | | 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
* | delete the null eaterMathMan052025-05-281-2/+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
* | Update some patches, switch to node-fetch-commonjs, more updatesEmma [it/its]@Rory&2024-10-284-9/+29
|/
* Perms for GET webhook, url propertyTomatoCake2024-07-181-1/+0
|
* Prettier & fix merge util/handlers/MessageTomatoCake2024-07-181-27/+31
|
* Merge branch 'master' of https://github.com/DEVTomatoCake/spacebar-server ↵TomatoCake2024-07-182-45/+58
|\ | | | | | | into feat/webhooks-3
| * Make channel ID optional when replyingTomatoCake2024-07-171-0/+8
| |
| * fix: check for message componentsCyber2024-07-091-1/+2
| |
| * fix: poll message is not an empty messageCyber2024-07-091-1/+2
| |
| * Make poll a single object instead of an arrayTomatoCake2024-07-091-4/+4
| |
| * fix poll in msg create schemaMadeline2024-07-091-16/+17
| |
| * Don't embed links in <>TomatoCake2024-07-041-1/+4
| |
| * Ban API compat & Bulk Ban endpoint (#1120)TomatoCake2024-06-051-10/+14
| | | | | | | | Co-authored-by: Madeline <46743919+MaddyUnderStars@users.noreply.github.com>
* | Fix ESLint & prettierTomatoCake2024-07-181-8/+20
| |
* | webhook fixes & username/avatar property for msgTomatoCake2024-07-181-34/+83
|/
* Embeds: handle og:sitenameMadeline2023-09-161-0/+7
|
* Fix regression where generic embed handler wouldn't properly send image resultsMadeline2023-09-161-5/+4
|
* [fb] remove provider obj, add colorPuyodead12023-09-031-3/+1
|
* add facebook, and add steam fieldsPuyodead12023-09-031-3/+54
|
* Rewrite thumbnail/image generation for embedsMadeline2023-09-031-83/+65
|
* Fix bug in embed handler where getMeta would not return undefinedMadeline2023-09-031-3/+5
|
* xkcd embed handler and improved generic handlerMadeline2023-09-021-20/+53
|
* Update ipAddress.tsZert3x2023-05-281-1/+1
|
* oapi: users progressPuyodead12023-04-131-0/+1
|
* gifs and query paramsPuyodead12023-04-131-0/+8
|
* fixing lots of openapi crapPuyodead12023-04-131-11/+15
|
* applicationsPuyodead12023-04-131-1/+2
|
* auth routesPuyodead12023-04-131-6/+11
|
* Remove ALL fosscord mentionsMadeline2023-03-3110-16/+16
|
* Revert "Merge pull request #1008 from spacebarchat/dev/samuel"Madeline2023-03-311-1/+1
| | | | | This reverts commit 69ea71aa9e0bd2e5a98904a66fba0ad3745707cb, reversing changes made to 8b2faf0b18336e5dff1eeff4e849bcfd96b09e88.
* Merge pull request #1008 from spacebarchat/dev/samuelSamuel (Flam3rboy)2023-03-301-1/+1
|\
| * fix: use entity.save() instead of insert (needed for caching)Samuel2023-03-181-1/+1
| |
* | SPACEBARMadeline2023-03-3112-12/+12
| |
* | SPACEBARMadeline2023-03-3112-12/+12
|/
* Remove channel mentions from messages, in order to fix them in test client.TheArcaneBrony2023-02-201-6/+10
| | | | Signed-off-by: TheArcaneBrony <myrainbowdash949@gmail.com>
* Add ESLint (#941)Madeline2023-01-209-61/+74
| | | | | | | * Add eslint, switch to lint-staged for precommit * Fix all ESLint errors * Update GH workflow to check prettier and eslint
* Add youtu.be embed handler (#945)Chris Chrome2023-01-181-1/+3
|
* Script to add license preamble to each file. Also, does that. (#935)Madeline2023-01-1812-0/+216
| | | | | | | | | * Add script to automatically add license to each file * Add license preamble to each file. * Fix existing preamble detection breaking due to line endings. Git :( * Prevent license from being added to code with other licenses
* Return embed proxy url even if imagor not set up. Also make warning nicerMadeline2023-01-161-5/+14
|
* Update dead linesMadeline2023-01-161-1/+1
|
* Add an error log if embed handler fails, in addition to the existing sentry logMadeline2023-01-151-0/+1
|
* PrettierMadeline2023-01-053-60/+127
|
* Registration tokensMadeline2022-12-191-1/+5
|
* Add additional configMadeline2022-12-191-1/+1
|
* Remove Discord oauth login supportMadeline2022-12-172-85/+1
|
* Remove `sharp` depMadeline2022-12-171-3/+4
|
* Move src-slowcord to own repo ↵Madeline2022-10-282-1/+85
| | | | https://github.com/MaddyUnderStars/slowcord-services
* Fix fix for twitter embeds from yesterdayMadeline2022-10-251-1/+1
|
* Fix tweets with only video breaking embedsMadeline2022-10-241-8/+8
|
* embed failMadeline2022-10-051-2/+2
|
* capture exception in sentry for embed processingMadeline2022-10-041-0/+6
|
* Embed cacheMadeline2022-10-031-6/+23
|
* Twitter embedsMadeline2022-10-032-11/+96
|
* Make imagor optionalMadeline2022-10-021-11/+14
|
* Use imagor for image resizingMadeline2022-10-021-3/+15
|
* More embed improvementsMadeline2022-10-021-50/+74
|
* Slightly better embedsMadeline2022-10-011-27/+155
|
* Better embed handlingMadeline2022-10-013-128/+156
|
* Fix fetching members for roles in POST messageMadeline2022-09-291-5/+5
|
* Prevent URL embedding and mentions when in codeblockMadeline2022-09-291-3/+3
|
* Fix message editingMadeline2022-09-271-1/+1
|
* PrettierMadeline2022-09-2610-104/+243
|
* Move schemas to /src/util/schemasMadeline2022-09-261-1/+1
|
* Refactor to mono-repo + upgrade packagesMadeline2022-09-2513-0/+124857