MaddyUnderStars / MaddyUnderStars/shoot

Separate internal representation of objects

Open
#78 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
61
Forks
5
Avg merge
3d 10h
Merged PRs (30d)
1

Description

The gateway often requires additional private information than what is publicly available. For example, GUILD_CREATE requires the guild ID which is why it currently includes separated `id` and `domain` fields, but this should actually only send a `mention` property which means the gateway has to do extra work to get the separated ID itself. Not a huge problem in this specific case, but there will likely be an issue in the future where we want to send special data to the gateway and not to the end user.

So if we extend `consume` and `emitGatewayEvent`'s signatures to be like `payload: GATEWAY_EVENT & {_internal: GATEWAY_PRIVATE}` or something, it'll be easy to remove that data when sending it off?

Contributor guide

No contributing guide indexed for this repository

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 tracing the `consume` and `emitGatewayEvent` entry points and the current `GUILD_CREATE` payload, especially its separate `id` and `domain` fields. Determine how internal data should be represented and removed before gateway delivery, then verify that public payloads still expose only the intended fields.

Written by the indexing model from the issue text.

Assessment

Tech stack
nodejs, typescript
Domain
backend-api-design
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.