forked from pothtonswer/discordmuffin
fix(Activity): accept non-string application ids (#1513)
This commit is contained in:
parent
0ad65a2e6f
commit
33044e2858
1 changed files with 2 additions and 2 deletions
|
@ -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"`
|
||||
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue