spacebarchat / spacebarchat/server

[Tracking] Gateway: resolve TODOs

Open
#1,603 0 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/gateway/opcodes/RequestChannelInfo.ts:48: status: d.fields.includes("status") ? null : undefined, // TODO: we dont track this
  • src/gateway/opcodes/RequestChannelInfo.ts:49: voice_start_time: d.fields.includes("voice_start_time") ? new Date().toISOString() : undefined, // TODO: we dont track this
  • src/gateway/opcodes/GuildSync.ts:24: // TODO: only show roles/members that have access to this channel
  • src/gateway/opcodes/GuildSync.ts:25: // TODO: config: to list all members (even those who are offline) sorted by role, or just those who are online
  • src/gateway/opcodes/GuildSync.ts:26: // TODO: rewrite typeorm
  • src/gateway/opcodes/LazyRequest.ts:25: // TODO: only show roles/members that have access to this channel
  • src/gateway/opcodes/LazyRequest.ts:26: // TODO: config: to list all members (even those who are offline) sorted by role, or just those who are online
  • src/gateway/opcodes/LazyRequest.ts:27: // TODO: rewrite typeorm
  • src/gateway/opcodes/LazyRequest.ts:159: // TODO: check data
  • src/gateway/opcodes/LazyRequest.ts:161: // noinspection JSUnusedLocalSymbols - TODO: implement typing/activities subscriptions
  • src/gateway/opcodes/LazyRequest.ts:234: // TODO: unsubscribe member_events that are not in op.members
  • src/gateway/opcodes/Identify.ts:64: // TODO: user sharding
  • src/gateway/opcodes/Identify.ts:65: // TODO: check privileged intents, if defined in the config
  • src/gateway/opcodes/Identify.ts:110: if (!identify.intents) identify.intents = 0b11011111111111111111111111111111111n; // TODO: what is this number?
  • src/gateway/opcodes/Identify.ts:113: // TODO: actually do intent things.
  • src/gateway/opcodes/Identify.ts:121: // TODO: why do we even care about this right now?
  • src/gateway/opcodes/Identify.ts:170: this.session.activities = identify.presence?.activities ?? []; // TODO: validation
  • src/gateway/opcodes/Identify.ts:236: // TODO: we don't really need every property of
  • src/gateway/opcodes/Identify.ts:268: // is_spam: true, // TODO
  • src/gateway/opcodes/Identify.ts:425: // TODO: For guild profiles, this may need to be changed.
  • src/gateway/opcodes/Identify.ts:426: // TODO: The only field required in the user prop is `id`,
  • src/gateway/opcodes/Identify.ts:448: //TODO get this a better type
  • src/gateway/opcodes/Identify.ts:464: //TODO maybe implement this correctly, by causing create and delete events for users who can newly view and not view the channels, along with doing these checks correctly, as they don't currently take into account that the owner of the guild is always able to view channels, with potentially other issues
  • src/gateway/opcodes/Identify.ts:530: // TODO: fix the types of Recipient
  • src/gateway/opcodes/Identify.ts:556: is_spam: false, // TODO
  • src/gateway/opcodes/Identify.ts:644: version: 0, // TODO
  • src/gateway/opcodes/Identify.ts:649: version: 0, // TODO
  • src/gateway/opcodes/Identify.ts:652: presences: [], // TODO: Send actual data
  • src/gateway/opcodes/Identify.ts:666: consented: false, // TODO
  • src/gateway/opcodes/Identify.ts:678: session_type: "normal", // TODO
  • src/gateway/opcodes/Identify.ts:782: // TODO: check if bot has permission to view some of these based on intents (i.e. GUILD_MEMBERS, GUILD_PRESENCES, GUILD_VOICE_STATES)
  • src/gateway/opcodes/Identify.ts:815: // TODO: ready supplemental
  • src/gateway/opcodes/Identify.ts:834: //TODO send GUILD_MEMBER_LIST_UPDATE
  • src/gateway/opcodes/Identify.ts:835: //TODO send VOICE_STATE_UPDATE to let the client know if another device is already connected to a voice channel
  • src/gateway/opcodes/Heartbeat.ts:37: // TODO: validate payload
  • src/gateway/opcodes/RequestChannelStatuses.ts:30: // TODO: implement
  • src/gateway/opcodes/StreamCreate.ts:39: // TODO: permissions check - if it's a guild, check if user is allowed to create stream in this guild
  • src/gateway/opcodes/StreamCreate.ts:47: // TODO: actually apply preferred_region from the event payload
  • src/gateway/opcodes/StreamWatch.ts:12: // TODO: apply perms: check if user is allowed to watch
  • src/gateway/opcodes/VoiceStateUpdate.ts:24: // TODO: check if a voice server is setup
  • src/gateway/opcodes/VoiceStateUpdate.ts:90: //TODO the member should only have these properties: hoisted_role, deaf, joined_at, mute, roles, user
  • src/gateway/opcodes/VoiceStateUpdate.ts:91: //TODO the member.user should only have these properties: avatar, discriminator, id, username
  • src/gateway/opcodes/VoiceStateUpdate.ts:92: //TODO this may fail
  • src/gateway/opcodes/RequestGuildMembers.ts:58: // TODO: Configurable limit?
  • src/gateway/opcodes/StreamDelete.ts:24: // noinspection JSUnusedLocalSymbols - TODO: what is type here?
  • src/gateway/util/Heartbeat.ts:22: // TODO: make heartbeat timeout configurable
  • src/gateway/util/Send.ts:63: // TODO: encode circular object
  • src/gateway/util/Send.ts:67: // TODO: compression
  • src/gateway/util/Utils.ts:43: // TODO: remove this when Server.stop() is fixed so that it waits for all websocket connections to run their
  • src/gateway/util/Utils.ts:46: // TODO: how is this different from clearing the table?
  • src/gateway/util/Utils.ts:66: // TODO: async json object streaming
  • src/gateway/events/Connection.ts:40: // TODO: check rate limit
  • src/gateway/events/Connection.ts:41: // TODO: specify rate limit in config
  • src/gateway/events/Connection.ts:42: // TODO: check msg max size
  • src/gateway/events/Close.ts:78: // TODO
  • src/gateway/events/Message.ts:39: // TODO: compression
  • src/gateway/events/Message.ts:90: // TODO: if all opcodes are implemented comment this out:
  • src/gateway/listener/listener.ts:40: // TODO: close connection on Invalidated Token
  • src/gateway/listener/listener.ts:41: // TODO: check intent
  • src/gateway/listener/listener.ts:42: // TODO: Guild Member Update is sent for current-user updates regardless of whether the GUILD_MEMBERS intent is set.
  • src/gateway/listener/listener.ts:59: // TODO: use already queried guilds/channels of Identify and don't fetch them again
  • src/gateway/listener/listener.ts:197: // TODO: only subscribe for events that are in the connection intents
  • src/gateway/listener/listener.ts:211: // TODO: what do we even send here?
  • src/gateway/listener/listener.ts:220: // TODO: what do we even send here?
  • src/gateway/listener/listener.ts:225: this.close(CLOSECODES.Invalid_session); // TODO: this is deprecated?

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 triaging the TODOs across src/gateway/opcodes, src/gateway/util, src/gateway/events, and src/gateway/listener/listener.ts, beginning with the opcode or event entry point for one narrowly scoped item. Check the surrounding implementation and existing gateway behavior; done requires resolving a defined TODO and updating this tracking list, but the issue does not specify tests or acceptance criteria.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.