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

Merge pull request #43 from EddyTravels/feature/location-attachment

Add location attachment support
This commit is contained in:
Harrison Shoebridge 2018-11-10 15:46:12 +11:00 committed by GitHub
commit 73c6387c54
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -92,7 +92,7 @@ type Recipient struct {
// Attachment is a file which used in a message. // Attachment is a file which used in a message.
type Attachment struct { type Attachment struct {
// Type is what type the message is. (image, video or audio) // Type is what type the message is. (image, video, audio or location)
Type string `json:"type"` Type string `json:"type"`
// Payload is the information for the file which was sent in the attachment. // Payload is the information for the file which was sent in the attachment.
Payload Payload `json:"payload"` Payload Payload `json:"payload"`
@ -112,4 +112,14 @@ type QuickReply struct {
type Payload struct { type Payload struct {
// URL is where the attachment resides on the internet. // URL is where the attachment resides on the internet.
URL string `json:"url,omitempty"` URL string `json:"url,omitempty"`
// Coordinates is Lat/Long pair of location pin
Coordinates *Coordinates `json:"coordinates,omitempty"`
}
// Coordinates is a pair of latitude and longitude
type Coordinates struct {
// Lat is latitude
Lat float64 `json:"lat"`
// Long is longitude
Long float64 `json:"long"`
} }