1
0
mirror of synced 2024-11-29 08:36:12 +03:00

Parse IDs as strings

Facebook changed their API to use strings instead of ints for IDs due to
some node.js limitation.

Fix #4
This commit is contained in:
Harrison 2016-05-20 09:18:44 +10:00
parent 1dc4bcc67d
commit 681541d027

View File

@ -12,7 +12,7 @@ type Receive struct {
// Entry is a batch of events which were sent in this webhook trigger. // Entry is a batch of events which were sent in this webhook trigger.
type Entry struct { type Entry struct {
// ID is the ID of the batch. // ID is the ID of the batch.
ID int64 `json:"id"` ID int64 `json:"id,string"`
// Time is when the batch was sent. // Time is when the batch was sent.
Time int64 `json:"time"` Time int64 `json:"time"`
// Messaging is the events that were sent in this Entry // Messaging is the events that were sent in this Entry
@ -39,12 +39,12 @@ type MessageInfo struct {
// Sender is who the message was sent from. // Sender is who the message was sent from.
type Sender struct { type Sender struct {
ID int64 `json:"id"` ID int64 `json:"id,string"`
} }
// Recipient is who the message was sent to. // Recipient is who the message was sent to.
type Recipient struct { type Recipient struct {
ID int64 `json:"id"` ID int64 `json:"id,string"`
} }
// Attachment is a file which used in a message. // Attachment is a file which used in a message.