From 07a6d515089b8465d57c0ff6c1a640d293b740c0 Mon Sep 17 00:00:00 2001 From: Ahmed Aboelyazeed Date: Fri, 22 Feb 2019 18:16:14 +0200 Subject: [PATCH] Fix conflict with receiving.go while cherry-picking --- .travis.yml | 2 +- examples/basic/main.go | 4 ++-- examples/linked-account/main.go | 16 ++++++++++------ receiving.go | 8 +++++++- 4 files changed, 20 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index ab5b8bc..362d290 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,7 @@ go: - 1.10.x - master -go_import_path: github.com/paked/messenger +go_import_path: github.com/gwinn/messenger install: go get -t ./... script: diff --git a/examples/basic/main.go b/examples/basic/main.go index da4c263..1f90d08 100644 --- a/examples/basic/main.go +++ b/examples/basic/main.go @@ -8,7 +8,7 @@ import ( "os" "time" - "github.com/paked/messenger" + "github.com/gwinn/messenger" ) var ( @@ -48,7 +48,7 @@ func main() { fmt.Println("Something went wrong!", err) } - r.Text(fmt.Sprintf("Hello, %v!", p.FirstName), messenger.ResponseType) + r.Text(fmt.Sprintf("Hello, %v!", p.FirstName), messenger.ResponseType, "") }) // Setup a handler to be triggered when a message is delivered diff --git a/examples/linked-account/main.go b/examples/linked-account/main.go index b70ac4f..be62c6c 100644 --- a/examples/linked-account/main.go +++ b/examples/linked-account/main.go @@ -11,7 +11,7 @@ import ( "strings" "time" - "github.com/paked/messenger" + "github.com/gwinn/messenger" ) const ( @@ -84,7 +84,7 @@ func main() { text = "You've been logged out of your account." } - if err := r.Text(text, messenger.ResponseType); err != nil { + if _, err := r.Text(text, messenger.ResponseType, ""); err != nil { log.Println("Failed to send account linking feedback") } }) @@ -116,7 +116,8 @@ func loginButton(r *messenger.Response) error { URL: "https://" + path.Join(*publicHost, loginPath), }, } - return r.ButtonTemplate("Link your account.", buttons, messenger.ResponseType) + _, err := r.ButtonTemplate("Link your account.", buttons, messenger.ResponseType, "") + return err } // logoutButton show to the user a button that can be used to start @@ -127,12 +128,14 @@ func logoutButton(r *messenger.Response) error { Type: "account_unlink", }, } - return r.ButtonTemplate("Unlink your account.", buttons, messenger.ResponseType) + _, err := r.ButtonTemplate("Unlink your account.", buttons, messenger.ResponseType, "") + return err } // greeting salutes the user. func greeting(p messenger.Profile, r *messenger.Response) error { - return r.Text(fmt.Sprintf("Hello, %v!", p.FirstName), messenger.ResponseType) + _, err := r.Text(fmt.Sprintf("Hello, %v!", p.FirstName), messenger.ResponseType, "") + return err } // help displays possibles actions to the user. @@ -153,7 +156,8 @@ func help(p messenger.Profile, r *messenger.Response) error { }, } - return r.TextWithReplies(text, replies, messenger.ResponseType) + _, err := r.TextWithReplies(text, replies, messenger.ResponseType, "") + return err } // loginForm is the endpoint responsible to displays a login diff --git a/receiving.go b/receiving.go index 316cbd8..5a0dade 100644 --- a/receiving.go +++ b/receiving.go @@ -112,8 +112,14 @@ type QuickReply struct { // Payload is the information on where an attachment is. type Payload struct { - // URL is where the attachment resides on the internet. URL string `json:"url,omitempty"` +<<<<<<< HEAD +======= +<<<<<<< HEAD + Title string `json:"title,omitempty"` +======= +>>>>>>> fcf031d (Fix conflict with receiving.go while cherry-picking) +>>>>>>> 92cbea4 (Fix conflict with receiving.go while cherry-picking) // Coordinates is Lat/Long pair of location pin Coordinates *Coordinates `json:"coordinates,omitempty"` }