Skip to content

Commit

Permalink
[overlays] Fix: Transmit event-id as string
Browse files Browse the repository at this point in the history
in order to compensate for i.e. CRDB very large IDs being truncated in
JSON transmit

Signed-off-by: Knut Ahlers <knut@ahlers.me>
  • Loading branch information
Luzifer committed Jul 26, 2024
1 parent c4be936 commit 014df15
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/apimodules/overlays/default/eventclient.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
/**
* SocketMessage received for every event and passed to the new `(eventObj) => { ... }` handlers
* @typedef {Object} SocketMessage
* @prop {Number} [event_id] - UID of the event used to re-trigger an event
* @prop {String} [event_id] - UID of the event used to re-trigger an event
* @prop {Boolean} [is_live] - Whether the event was sent through a replay (false) or occurred live (true)
* @prop {String} [reason] - Reason of this message (one of `bulk-replay`, `live-event`, `single-replay`)
* @prop {String} [time] - RFC3339 timestamp of the event
Expand Down
2 changes: 1 addition & 1 deletion internal/apimodules/overlays/overlays.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ type (

// socketMessage represents the message overlay sockets will receive
socketMessage struct {
EventID uint64 `json:"event_id"`
EventID uint64 `json:"event_id,string"`
IsLive bool `json:"is_live"`
Reason sendReason `json:"reason"`
Time time.Time `json:"time"`
Expand Down

0 comments on commit 014df15

Please sign in to comment.