Skip to content

[Gateway] bigint fields should be sent as JSON integers, not strings #1506

@ahmouse15

Description

@ahmouse15

Describe the bug
Spacebar incorrectly sends bigint fields as strings instead of integers in JSON. This affects client parsing of a User object's flags, public_flags, and purchased_flags at least.

To Reproduce
Steps to reproduce the behavior:

  1. Run Spacebar Gateway
  2. Observe payload from READY event emitted by Gateway WebSocket after logging in
  3. user.public_flags has e.g. "64" instead of 64

Expected behavior
bigints should be sent as integers. See the sample response from the Discord API docs here: https://docs.discord.com/developers/resources/user#user-object-example-user

System Information (please complete the following information):

  • OS: Gentoo Linux
  • Node Version: v24.13.1
  • Python 3 Version: 3.13.11

Env and Software info

  • Branch: master
  • Commit Hash: 4d711c5
  • Database: Postgres 18
  • Reverse Proxy: n/a (localhost)
  • Thread Count: 1

Additional context
This bug prevents Dissent from connecting to Spacebar instances (likely among other bugs).

Sample response from Spacebar gateway:

{"op":0,"t":"READY","s":0,"d":{"v":9,"user":{"username":"admin","discriminator":"4332","id":"1471412073861865509","public_flags":"31",...}}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions