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

invalid_attachments_format #28

Open
kolucciy opened this issue Jan 26, 2018 · 1 comment
Open

invalid_attachments_format #28

kolucciy opened this issue Jan 26, 2018 · 1 comment

Comments

@kolucciy
Copy link

Is it possible to reply with attachment to command?

                    $bot->reply('', [
                        "attachments" => json_encode([
                            [
                                "color" => "good",
                                "text" => "No active timers found..."
                            ]
                        ])
                    ]);

It fails with the following error in Slack:

/comamnd failed with the error "invalid_attachments_format"

@kolucciy kolucciy changed the title */comamnd* failed with the error "invalid_attachments_format" "invalid_attachments_format" Jan 26, 2018
@kolucciy kolucciy changed the title "invalid_attachments_format" invalid_attachments_format Jan 26, 2018
@Jeto143
Copy link

Jeto143 commented Apr 15, 2018

@kolucciy I've just faced the same issue and it seems like when using reply, you don't need the json_encode part. It will go through \Symfony\Component\HttpFoundation\JsonResponse which automatically encodes stuff for you.

It does seem inconsistent with say, though (feels like both should accept array formats).

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

No branches or pull requests

2 participants