spacebarchat / spacebarchat/server

[Tracking] API: resolve TODOs

Open
#1,600 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Good first issue javascript Priority:low
Dominant language
TypeScript
Stars
2.2k
Forks
323
Avg merge
14h 48m
Merged PRs (30d)
4

Description

Generated at commit 57827bc9:

  • src/api/routes/stage-instances.ts:25: //TODO
  • src/api/routes/read-states/ack-bulk.ts:39: // TODO: what is read_state_type ?
  • src/api/routes/applications/@me.ts:27: // TODO: actually make this be correct - this is just a copy paste of /applications/:id/index.ts minus delete
  • src/api/routes/applications/#application_id/guilds/#guild_id/commands/index.ts:82: // TODO: configurable?
  • src/api/routes/applications/#application_id/guilds/#guild_id/commands/index.ts:168: // TODO: configurable?
  • src/api/routes/applications/#application_id/guilds/#guild_id/commands/#command_id/index.ts:90: // TODO: configurable?
  • src/api/routes/applications/#application_id/entitlements.ts:34: // TODO:
  • src/api/routes/applications/#application_id/commands/index.ts:59: // TODO: configurable?
  • src/api/routes/applications/#application_id/commands/index.ts:130: // TODO: configurable?
  • src/api/routes/applications/#application_id/commands/#command_id/index.ts:71: // TODO: configurable?
  • src/api/routes/guilds/index.ts:26: //TODO: create default channel
  • src/api/routes/guilds/#guild_id/member-verification.ts:33: // TODO: member verification
  • src/api/routes/guilds/#guild_id/regions.ts:40: //TODO we should use an enum for guild's features and not hardcoded strings
  • src/api/routes/guilds/#guild_id/application-command-index.ts:66: // name_localized: // TODO: make this work
  • src/api/routes/guilds/#guild_id/application-command-index.ts:69: // description_localized: // TODO: make this work
  • src/api/routes/guilds/#guild_id/index.ts:97: // TODO: guild update check image
  • src/api/routes/guilds/#guild_id/index.ts:111: // TODO move these
  • src/api/routes/guilds/#guild_id/index.ts:124: // TODO: check if body ids are valid
  • src/api/routes/guilds/#guild_id/index.ts:194: // TODO: guild hashes
  • src/api/routes/guilds/#guild_id/index.ts:195: // TODO: fix vanity_url_code, template_id
  • src/api/routes/guilds/#guild_id/messages/search.ts:45: // include_nsfw, // TODO
  • src/api/routes/guilds/#guild_id/messages/search.ts:48: // sort_by, // TODO: Handle 'relevance'
  • src/api/routes/guilds/#guild_id/widget.png.ts:31: // TODO: use svg templates instead of node-canvas for improved performance and to change it easily
  • src/api/routes/guilds/#guild_id/widget.png.ts:34: // TODO: Cache the response
  • src/api/routes/guilds/#guild_id/widget.png.ts:69: // TODO: Widget style templates need Spacebar branding
  • src/api/routes/guilds/#guild_id/bans.ts:27:/* TODO: Deleting the secrets is just a temporary go-around. Views should be implemented for both safety and better handling. */
  • src/api/routes/guilds/#guild_id/audit-logs.ts:23: //TODO: implement audit logs
  • src/api/routes/guilds/#guild_id/profile.ts:49: tag: guild.name.substring(0, 4).toUpperCase(), // TODO: allow custom tags
  • src/api/routes/guilds/#guild_id/discovery-requirements.ts:35: // TODO:
  • src/api/routes/guilds/#guild_id/voice-states/#user_id/index.ts:25: //TODO need more testing when community guild and voice stage channel are working
  • src/api/routes/guilds/#guild_id/premium.ts:24: // TODO:
  • src/api/routes/guilds/#guild_id/integrations.ts:23: //TODO: implement integrations list
  • src/api/routes/guilds/#guild_id/roles/#role_id/index.ts:92: // TODO: check role hierarchy
  • src/api/routes/guilds/#guild_id/roles/#role_id/member-ids.ts:28: // TODO: Is this route really not paginated?
  • src/api/routes/guilds/#guild_id/roles/#role_id/members.ts:40: // TODO (erkin): have a bulk add/remove function that adds the roles in a single txn
  • src/api/routes/guilds/#guild_id/widget.json.ts:90: // TODO: Refactor invite create code to a shared function
  • src/api/routes/guilds/#guild_id/widget.json.ts:124: // TODO: Understand how Discord's max 100 random member sample works, and apply to here (see top of this file)
  • src/api/routes/guilds/#guild_id/widget.json.ts:135: status: "online", // TODO
  • src/api/routes/guilds/#guild_id/members/index.ts:28: // TODO: send over websocket
  • src/api/routes/guilds/#guild_id/members/index.ts:29: // TODO: check for GUILD_MEMBERS intent
  • src/api/routes/guilds/#guild_id/members/#member_id/index.ts:171: // TODO: Lurker mode
  • src/api/routes/guilds/#guild_id/members/#member_id/index.ts:182: // TODO: check oauth2 scope
  • src/api/routes/guilds/#guild_id/members/#member_id/index.ts:227: // TODO: unless force-joined
  • src/api/routes/guilds/automations/email-domain-lookup.ts:62: // noinspection JSUnusedLocalSymbols - TODO: implement
  • src/api/routes/discoverable-guilds.ts:53: ...(categories == undefined ? {} : { primary_category_id: categories.toString() }), // TODO: isnt this an array?
  • src/api/routes/users/@me/billing/location-info.ts:26: // TODO: subdivision_code (optional)
  • src/api/routes/users/@me/billing/payment-sources.ts:51: // TODO: schema
  • src/api/routes/users/@me/billing/payment-sources.ts:56: // TODO: schema
  • src/api/routes/users/@me/billing/payment-sources.ts:61: // TODO: schema
  • src/api/routes/users/@me/billing/payment-sources.ts:69: // TODO: schema
  • src/api/routes/users/@me/billing/payment-sources.ts:77: // TODO: schema
  • src/api/routes/users/@me/billing/subscriptions.ts:25: //TODO
  • src/api/routes/users/@me/applications/#application_id/entitlements.ts:25: //TODO
  • src/api/routes/users/@me/index.ts:155: // TODO: HACK - maybe make this optional?
  • src/api/routes/users/@me/index.ts:226: // TODO: send update member list event in gateway
  • src/api/routes/users/@me/relationships.ts:234: // TODO: you can add infinitely many blocked users (should this be prevented?)
  • src/api/routes/users/@me/guilds/premium/subscription-slots.ts:25: // TODO:
  • src/api/routes/users/@me/guilds/#guild_id/settings.ts:62: // TODO: rewrite to a single query?
  • src/api/routes/users/@me/mfa/codes.ts:27: // TODO: This route is replaced with users/@me/mfa/codes-verification in newer clients
  • src/api/routes/users/@me/mfa/webauthn/credentials/index.ts:75: // TODO: I did this for typescript and I can't use !
  • src/api/routes/users/@me/mfa/codes-verification.ts:46: // TODO: We don't have email/etc etc, so can't send a verification code.
  • src/api/routes/users/@me/mfa/totp/enable.ts:53: // TODO: Are guests allowed to enable 2fa?
  • src/api/routes/users/@me/entitlements.ts:25: // TODO:
  • src/api/routes/users/@me/delete.ts:55: // TODO: decrement guild member count
  • src/api/routes/users/@me/devices.ts:25: // TODO:
  • src/api/routes/users/@me/email-settings.ts:25: // TODO:
  • src/api/routes/users/@me/connections/#connection_name/#connection_id/index.ts:25: // TODO: connection update schema
  • src/api/routes/users/@me/connections/#connection_name/#connection_id/index.ts:40: // TODO: do we need to do anything if the connection is revoked?
  • src/api/routes/users/@me/connections/#connection_name/#connection_id/access-token.ts:24: // TODO: this route is only used for spotify, twitch, and youtube. (battlenet seems to be able to PUT, maybe others also)
  • src/api/routes/users/@me/library.ts:25: // TODO:
  • src/api/routes/users/@me/activities/statistics/applications.ts:25: // TODO:
  • src/api/routes/users/@me/affinities/users.ts:25: // TODO:
  • src/api/routes/users/@me/affinities/guilds.ts:25: // TODO:
  • src/api/routes/users/@me/guilds.ts:44: guild = []; // TODO: Load guilds with user role permissions number
  • src/api/routes/users/#user_id/delete.ts:185: // TODO: respect intents as USER_DELETE has potential to cause privacy issues
  • src/api/routes/users/#user_id/profile.ts:82: // TODO: make proper DTO's in util?
  • src/api/routes/users/#user_id/profile.ts:117: premium_guild_since: premium_guild_since, // TODO
  • src/api/routes/users/#user_id/profile.ts:118: premium_since: user.premium_since, // TODO
  • src/api/routes/users/#user_id/profile.ts:119: mutual_guilds: with_mutual_guilds ? mutual_guilds : undefined, // TODO {id: "", nick: null} when ?with_mutual_guilds=true
  • src/api/routes/users/#user_id/profile.ts:124: profile_themes_experiment_bucket: 4, // TODO: This doesn't make it available, for some reason?
  • src/api/routes/users/#user_id/profile.ts:160: // TODO: send update member list event in gateway
  • src/api/routes/users/#user_id/messages.ts:55: // TODO: POST to send a message to the user
  • src/api/routes/gifs/search.ts:52: // TODO: Custom providers
  • src/api/routes/gifs/trending-gifs.ts:47: // TODO: Custom providers
  • src/api/routes/gifs/trending.ts:42: // TODO: Custom providers
  • src/api/routes/gifs/trending.ts:43: // TODO: return gifs as mp4
  • src/api/routes/oauth2/authorize.ts:25: // TODO: scopes, other oauth types
  • src/api/routes/oauth2/authorize.ts:36: // TODO: I really didn't feel like typing all of it out
  • src/api/routes/oauth2/authorize.ts:65: // TODO: use DiscordApiErrors
  • src/api/routes/oauth2/authorize.ts:123: avatar_decoration: null, // TODO
  • src/api/routes/oauth2/authorize.ts:135: guild_id: null, // TODO support guilds
  • src/api/routes/oauth2/authorize.ts:145: avatar_decoration: null, // TODO
  • src/api/routes/oauth2/authorize.ts:149: approximated_guild_count: 0, // TODO
  • src/api/routes/oauth2/authorize.ts:194: // TODO: ensure guild_id is not an empty string
  • src/api/routes/oauth2/authorize.ts:195: // TODO: captcha verification
  • src/api/routes/oauth2/authorize.ts:196: // TODO: MFA verification
  • src/api/routes/oauth2/authorize.ts:210: // TODO: use DiscordApiErrors
  • src/api/routes/oauth2/tokens.ts:24: //TODO
  • src/api/routes/outbound-promotions.ts:25: //TODO
  • src/api/routes/auth/mfa/webauthn.ts:48: // TODO: I did this for typescript and I can't use !
  • src/api/routes/auth/register.ts:111: // TODO: check if fingerprint was eligible generated
  • src/api/routes/auth/register.ts:176: // TODO: gift_code_sku_id?
  • src/api/routes/auth/register.ts:177: // TODO: check password strength
  • src/api/routes/auth/location-metadata.ts:34: //TODO
  • src/api/routes/auth/reset.ts:27: // TODO: the response interface also returns settings, but this route doesn't actually return that.
  • src/api/routes/auth/verify/index.ts:34: // TODO: the response interface also returns settings, but this route doesn't actually return that.
  • src/api/routes/auth/verify/resend.ts:46: // TODO: whats the proper error response for this?
  • src/api/routes/auth/login.ts:111: // TODO: This is not a discord.com ticket. I'm not sure what it is but I'm lazy
  • src/api/routes/auth/login.ts:119: sms: false, // TODO
  • src/api/routes/auth/login.ts:126: // TODO: I did this for typescript and I can't use !
  • src/api/routes/auth/login.ts:150: sms: false, // TODO
  • src/api/routes/track.ts:30: // TODO:
  • src/api/routes/discovery.ts:35: // TODO:
  • src/api/routes/connections/#connection_name/#connection_id/refresh.ts:24: // TODO:
  • src/api/routes/channels/#channel_id/webhooks.ts:55: // TODO: use Image Data Type for avatar instead of String
  • src/api/routes/channels/#channel_id/webhooks.ts:87: // TODO: move this
  • src/api/routes/channels/#channel_id/tags.ts:96: //TODO better error
  • src/api/routes/channels/#channel_id/index.ts:25: // TODO: delete channel
  • src/api/routes/channels/#channel_id/index.ts:26: // TODO: Get channel
  • src/api/routes/channels/#channel_id/index.ts:161: //TODO better error maybe?
  • src/api/routes/channels/#channel_id/index.ts:170: //TODO maybe error if this fails, and maybe handle creating tags?
  • src/api/routes/channels/#channel_id/index.ts:189: //TODO better error
  • src/api/routes/channels/#channel_id/index.ts:198: //TODO maybe error instead?
  • src/api/routes/channels/#channel_id/greet.ts:60: code: 400, // TODO: what's the actual error code?
  • src/api/routes/channels/#channel_id/messages/index.ts:258: // TODO: config max upload size
  • src/api/routes/channels/#channel_id/messages/index.ts:268: TODO: dynamically change limit of MessageCreateSchema with config
  • src/api/routes/channels/#channel_id/messages/index.ts:271: TODO: text channel slowdown (per-user and across-users)
  • src/api/routes/channels/#channel_id/messages/index.ts:273: TODO: only dispatch notifications for mentions denoted in allowed_mentions
  • src/api/routes/channels/#channel_id/messages/index.ts:529: // TODO: handle other read state types
  • src/api/routes/channels/#channel_id/messages/search.ts:52: // include_nsfw, // TODO
  • src/api/routes/channels/#channel_id/messages/search.ts:55: // sort_by, // TODO: Handle 'relevance'
  • src/api/routes/channels/#channel_id/messages/#message_id/ack.ts:25: // TODO: public read receipts & privacy scoping
  • src/api/routes/channels/#channel_id/messages/#message_id/ack.ts:26: // TODO: send read state event to all channel members
  • src/api/routes/channels/#channel_id/messages/#message_id/ack.ts:27: // TODO: advance-only notification cursor
  • src/api/routes/channels/#channel_id/messages/#message_id/index.ts:41: // TODO: message content/embed string length limit
  • src/api/routes/channels/#channel_id/messages/#message_id/index.ts:94: // TODO: should message_reference be overridable?
  • src/api/routes/channels/#channel_id/messages/#message_id/index.ts:118: // TODO: a DTO?
  • src/api/routes/channels/#channel_id/messages/#message_id/reactions.ts:41: // TODO: check if emoji is really an unicode emoji or a properly encoded external emoji
  • src/api/routes/channels/#channel_id/messages/#message_id/crosspost.ts:35: // TODO:
  • src/api/routes/channels/#channel_id/messages/#message_id/threads.ts:27: // TODO: public read receipts & privacy scoping
  • src/api/routes/channels/#channel_id/messages/#message_id/threads.ts:28: // TODO: send read state event to all channel members
  • src/api/routes/channels/#channel_id/messages/#message_id/threads.ts:29: // TODO: advance-only notification cursor
  • src/api/routes/channels/#channel_id/messages/#message_id/threads.ts:42: // TODO: check for differences with https: //github.com/spacebarchat/server/pull/876/files#diff-95be9c4cdfd8ba6f67361cd40b9abc8226b35d83e2bb44bf5b4682f1d66155e9
  • src/api/routes/channels/#channel_id/recipients.ts:48: throw DiscordApiErrors.INVALID_RECIPIENT; //TODO is this the right error?
  • src/api/routes/channels/#channel_id/recipients.ts:93: throw DiscordApiErrors.INVALID_RECIPIENT; //TODO is this the right error?
  • src/api/routes/channels/#channel_id/purge.ts:31:TODO: apply the delete bit by bit to prevent client and database stress
  • src/api/routes/channels/#channel_id/purge.ts:64: // TODO: send the deletion event bite-by-bite to prevent client stress
  • src/api/routes/channels/#channel_id/post-data.ts:29: // TODO: public read receipts & privacy scoping
  • src/api/routes/channels/#channel_id/post-data.ts:30: // TODO: send read state event to all channel members
  • src/api/routes/channels/#channel_id/post-data.ts:31: // TODO: advance-only notification cursor
  • src/api/routes/channels/#channel_id/thread-members.ts:81: // TODO what's the actual permission for this?
  • src/api/routes/channels/#channel_id/thread-members.ts:135: // TODO: require thread creator for private threads
  • src/api/routes/channels/#channel_id/thread-members.ts:185: // TODO
  • src/api/routes/channels/#channel_id/permissions.ts:27: // TODO: Only permissions your bot has in the guild or channel can be allowed/denied (unless your bot has a MANAGE_ROLES overwrite in the channel)
  • src/api/routes/channels/#channel_id/permissions.ts:83: // TODO: check permission hierarchy
  • src/api/routes/channels/#channel_id/threads.ts:44: // TODO: public read receipts & privacy scoping
  • src/api/routes/channels/#channel_id/threads.ts:45: // TODO: send read state event to all channel members
  • src/api/routes/channels/#channel_id/threads.ts:46: // TODO: advance-only notification cursor
  • src/api/routes/channels/#channel_id/threads.ts:67: // TODO: check for differences with https: //github.com/spacebarchat/server/pull/876/files#diff-95be9c4cdfd8ba6f67361cd40b9abc8226b35d83e2bb44bf5b4682f1d66155e9
  • src/api/routes/channels/#channel_id/threads.ts:77: //TODO better error
  • src/api/routes/channels/#channel_id/threads.ts:82: //TODO better error
  • src/api/routes/channels/#channel_id/followers.ts:21: // TODO:
  • src/api/routes/reporting/index.ts:63: // TODO: implement
  • src/api/routes/reporting/index.ts:69: // noinspection JSUnusedLocalSymbols - TODO: implement
  • src/api/routes/reporting/index.ts:84: // TODO: implement
  • src/api/routes/reporting/index.ts:167: // TODO: did i miss anything?
  • src/api/routes/reporting/index.ts:202: throw new HTTPError("Validation success - implementation TODO", 418);
  • src/api/routes/partners/#guild_id/requirements.ts:26: // TODO:
  • src/api/routes/store/published-listings/applications/#application_id/index.ts:25: //TODO
  • src/api/routes/store/published-listings/applications/#application_id/subscription-plans.ts:25: //TODO
  • src/api/routes/store/published-listings/skus.ts:25: //TODO
  • src/api/routes/store/published-listings/skus/#sku_id/subscription-plans.ts:320: // TODO: add the ability to add custom
  • src/api/routes/science.ts:32: // TODO:
  • src/api/routes/emojis/#emoji_id/source.ts:51: // TODO: emojis can be owned by applications these days, account for this when we get there?
  • src/api/routes/experiments.ts:25: // TODO:
  • src/api/routes/interactions/#interaction_id/#interaction_token/callback.ts:89: // TODO
  • src/api/routes/interactions/#interaction_id/#interaction_token/callback.ts:95: // TODO
  • src/api/routes/interactions/#interaction_id/#interaction_token/callback.ts:150: // TODO
  • src/api/routes/interactions/#interaction_id/#interaction_token/callback.ts:153: // TODO
  • src/api/routes/interactions/#interaction_id/#interaction_token/callback.ts:156: // TODO
  • src/api/routes/interactions/#interaction_id/#interaction_token/callback.ts:159: // TODO
  • src/api/routes/interactions/#interaction_id/#interaction_token/callback.ts:162: // TODO
  • src/api/routes/interactions/#interaction_id/#interaction_token/callback.ts:168: // TODO
  • src/api/routes/interactions/#interaction_id/#interaction_token/callback.ts:171: // TODO
  • src/api/routes/template.ts.disabled:1: //TODO: this is a template for a generic route
  • src/api/routes/beaker.ts:34: // TODO:
  • src/api/routes/warp/license.ts:34: // TODO:
  • src/api/routes/webhooks/#webhook_id/#token/index.ts:45: // TODO: config max upload size
  • src/api/routes/webhooks/#webhook_id/#token/index.ts:56: // TODO: Slack compatible hooks
  • src/api/routes/webhooks/#webhook_id/#token/index.ts:152: // noinspection JSUnusedLocalSymbols - TODO: shouldnt token be checked?
  • src/api/middlewares/RateLimit.ts:25: // TODO: use better caching (e.g. redis) as else it creates to much pressure on the database
  • src/api/middlewares/RateLimit.ts:30:TODO: delay database requests to include multiple queries
  • src/api/middlewares/RateLimit.ts:31:TODO: different for methods (GET/POST)
  • src/api/middlewares/RateLimit.ts:120: // TODO: error rate limit message translation
  • src/api/middlewares/CORS.ts:21: // TODO: config settings
  • src/api/middlewares/CORS.ts:29: // TODO: use better CSP
  • src/api/util/utility/RandomInviteID.ts:22: // TODO: 'random'? seriously? who named this?
  • src/api/util/utility/passwordStrength.ts:25: // const blocklist: string[] = []; // TODO: update ones passwordblocklist is stored in db
  • src/api/util/utility/EmbedHandlers.ts:139: // TODO
  • src/api/util/utility/EmbedHandlers.ts:175: // TODO: handle video
  • src/api/util/utility/EmbedHandlers.ts:238: if (!url.href.includes("/status/")) return null; // TODO;
  • src/api/util/utility/EmbedHandlers.ts:330: // TODO: Client won't merge these into a single embed, for some reason.
  • src/api/util/utility/EmbedHandlers.ts:362: // TODO: docs: Pixiv won't work without Imagor
  • src/api/util/utility/EmbedHandlers.ts:423: // TODO: meant to be thumbnail.
  • src/api/util/utility/EmbedHandlers.ts:435: // TODO: Video
  • src/api/util/utility/EmbedHandlers.ts:473: // TODO: author channel url
  • src/api/util/utility/EmbedHandlers.ts:571: // TODO: expiry?
  • src/api/util/handlers/Webhook.ts:54: // TODO: creating messages by users checks if the user can bypass rate limits, we cant do that on webhooks, but maybe we could check the application if there is one?
  • src/api/util/handlers/Webhook.ts:108: // TODO: Support thread_id/thread_name once threads are implemented
  • src/api/util/handlers/Instance.ts:23: // TODO: clean up database and delete tombstone data
  • src/api/util/handlers/Instance.ts:24: // TODO: set first user as instance administrator/or generate one if none exists and output it in the terminal
  • src/api/util/handlers/Instance.ts:27: // TODO: check if any current user is not part of autoJoinGuilds
  • src/api/util/handlers/Instance.ts:37: // TODO: do no clear sessions for instance cluster
  • src/api/util/handlers/route.ts:25: // skip validation for settings proto JSON updates - TODO: figure out if this even possible to fix?
  • src/api/util/handlers/route.ts:30: // TODO: fix this
  • src/api/util/handlers/Voice.ts:33: //TODO the endpoint location should be saved in the database if not already present to prevent IPAnalysis call
  • src/api/util/handlers/Message.ts:56: // TODO: check webhook, application, system author, stickers
  • src/api/util/handlers/Message.ts:57: // TODO: embed gifs/videos/images
  • src/api/util/handlers/Message.ts:290: // TODO: stickers/activity
  • src/api/util/handlers/Message.ts:315: // TODO: explicit-only mentions
  • src/api/util/handlers/Message.ts:366: // TODO: mention_roles and mentions arrays - not needed it seems, but discord still returns that
  • src/api/util/handlers/Message.ts:525: // TODO: check and put it all in the body
  • src/api/util/handlers/Message.ts:530: // TODO: cache link result in db

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the generated TODO list from commit 57827bc9 and group the entries by route area under src/api/routes/. Read each referenced route and its surrounding API behavior before deciding which TODOs have enough context to address. Done means the selected TODOs are resolved and the tracking list is updated accordingly.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, backend
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.