spacebarchat / spacebarchat/server
certain instances of public_flags are sent as the wrong data type
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:
- 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
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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