maciekmm / messenger-platform-go-sdk

:envelope: A GO SDK for Facebook's messenger-platform: https://developers.facebook.com/docs/messenger-platform
MIT License
110 stars 27 forks source link

ButtonTemplate not working #30

Open seenickcode opened 7 years ago

seenickcode commented 7 years ago

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 commented 7 years ago

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.

seenickcode commented 7 years ago

Great thank you.

On Sat, Jun 24, 2017 at 8:29 PM, Maciej Mionskowski < notifications@github.com> wrote:

Hello, @seenickcode https://github.com/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.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/maciekmm/messenger-platform-go-sdk/issues/30#issuecomment-310856754, or mute the thread https://github.com/notifications/unsubscribe-auth/AAEoOa7hqZtCsF7KFiaxEKu9dDA26wgAks5sHVWmgaJpZM4ODfYo .

--

Mit freundlichen Grüßen, Nicholas

seenickcode commented 7 years ago

Ok opened https://github.com/maciekmm/messenger-platform-go-sdk/pull/31

seenickcode commented 7 years ago

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 commented 7 years ago

@seenickcode @maciekmm any updates?

maciekmm commented 7 years ago

@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 commented 7 years ago

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 commented 7 years ago

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

maciekmm commented 7 years ago

@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 commented 7 years ago

That's fair and I forgot about that they were indeed failing. Will revisit this next month because too busy now unfortunately.

On Aug 9, 2017, 7:37 PM +0200, Maciej Mionskowski notifications@github.com, wrote:

@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. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.