Skip to content

Commit

Permalink
fix(Activity): accept non-string application ids (#1513)
Browse files Browse the repository at this point in the history
  • Loading branch information
TomWright authored Jul 7, 2024
1 parent 0ad65a2 commit 33044e2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions structs.go
Original file line number Diff line number Diff line change
Expand Up @@ -2212,7 +2212,7 @@ func (activity *Activity) UnmarshalJSON(b []byte) error {
Type ActivityType `json:"type"`
URL string `json:"url,omitempty"`
CreatedAt int64 `json:"created_at"`
ApplicationID string `json:"application_id,omitempty"`
ApplicationID json.Number `json:"application_id,omitempty"`
State string `json:"state,omitempty"`
Details string `json:"details,omitempty"`
Timestamps TimeStamps `json:"timestamps,omitempty"`
Expand All @@ -2227,8 +2227,8 @@ func (activity *Activity) UnmarshalJSON(b []byte) error {
if err != nil {
return err
}
activity.ApplicationID = temp.ApplicationID.String()
activity.CreatedAt = time.Unix(0, temp.CreatedAt*1000000)
activity.ApplicationID = temp.ApplicationID
activity.Assets = temp.Assets
activity.Details = temp.Details
activity.Emoji = temp.Emoji
Expand Down

0 comments on commit 33044e2

Please sign in to comment.