Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ButtonTemplate not working #30

Open
seenickcode opened this issue Jun 23, 2017 · 10 comments
Open

ButtonTemplate not working #30

seenickcode opened this issue Jun 23, 2017 · 10 comments
Labels

Comments

@seenickcode
Copy link

Users are forced to use GenericTemplate instead of ButtonTemplate because ButtonTemplate requires a 'buttons' field, not 'elements' field.

mq.Template(template.GenericTemplate{Title: title,
		Buttons: []template.Button{
			{
				Type:    template.ButtonTypePostback,
				Payload: postbackPayload,
				Title:   buttonTitle,
			},
		},
	})
@maciekmm
Copy link
Owner

Hello, @seenickcode
It indeed looks like facebook has changed the way it handles templates now. It requires a bit more work than I thought it would. I will eventually get this fixed, but pull requests are more than welcome :)

Thanks for reporting the issue.

@maciekmm maciekmm added the bug label Jun 24, 2017
@seenickcode
Copy link
Author

seenickcode commented Jun 25, 2017 via email

@seenickcode
Copy link
Author

Ok opened #31

@seenickcode
Copy link
Author

Hey @maciekmm could you take a look when you get a chance? I have another PR I'm waiting to open too once this fix is complete. Thanks.

@stanleyye
Copy link
Contributor

@seenickcode @maciekmm any updates?

@maciekmm
Copy link
Owner

maciekmm commented Aug 7, 2017

@stanleyye @seenickcode 's contribution unfortunately does not meet coding standards of this repository. I am currently pretty busy and thus having no time to contribute. If you happen to implement this feature on your own please consider doing a pull request.

@seenickcode
Copy link
Author

It appears that this library is abandonware because Facebook changes its features often as the @maciekmm doesn't have time to maintain. The PR I submitted doesn't "meet coding standards" because the test coverage went down by 5.7%. I'm not sure how to submit a PR of a fork. Does this article explain a recommendation properly? http://blog.campoy.cat/2014/03/github-and-go-forking-pull-requests-and.html if so I will follow it and re-submit.

@cee-dub
Copy link

cee-dub commented Aug 7, 2017

I followed roughly those steps with my recent successful PR here #24.

@maciekmm
Copy link
Owner

maciekmm commented Aug 9, 2017

@seenickcode It doesn't even pass the remaining tests. I am okay with lowering coverage a bit for a short period of time if there are benefits to that. But I am not okay with the travis not building it correctly.

@seenickcode
Copy link
Author

seenickcode commented Aug 9, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants