spacebarchat / spacebarchat/server

certain instances of public_flags are sent as the wrong data type

Open
#1,553 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
2.2k
Forks
323
Avg merge
14h 48m
Merged PRs (30d)
4

Description

Describe the bug
The public_flags (and perhaps other) parameters when sent to connecting clients over the Gateway websocket and certain API endpoints like api/v9/channels/channelId/webhooks are sent as strings and not ints.
So, when using DiscordGo, it complains about public_flags being a string.

To Reproduce
Steps to reproduce the behavior:

  1. Do anything that tries to deserialize these fields into an int. (i.e. DiscordGo)

Expected behavior
Sent value is an int. Library/client/bot does not complain about the data types

Console Logs
Feb 23 11:43:11 sike matterbridge[2246857]: 2026/02/23 11:43:11 [DG0] wsapi.go:646:onEvent() error unmarshalling MESSAGE_CREATE event, json: cannot unmarshal string into Go struct field User.message.author.public_flags of type discordgo.UserFlags

Image

System Information (please complete the following information):

  • OS: Ubuntu
  • Version (If not applicable skip): 24.04
  • Node Version: 24.13.1
  • Python 3 Version: Python 3.13.12

Env and Software info

  • Release: nightly
  • Branch (if release is not applicable): master
  • Commit Hash (if release is not applicable): 785f53e7d1f485941e47f13f4558f9568571f9b0
  • Database: 16.11
  • Reverse Proxy: cloudflared
  • Thread Count: default

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

Trace the public_flags value from the Gateway websocket MESSAGE_CREATE event and the api/v9/channels/channelId/webhooks endpoint through the server's response handling. Reproduce the deserialization failure with a client such as DiscordGo, then verify that these responses expose public_flags as an integer rather than a string.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.