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

Function to() doesn't work #54

Closed
ok200paul opened this issue Feb 1, 2022 · 7 comments
Closed

Function to() doesn't work #54

ok200paul opened this issue Feb 1, 2022 · 7 comments

Comments

@ok200paul
Copy link

  • Slack Notification Channel Version: 2.4.0
  • Laravel Version: 8.81.0
  • PHP Version: 8.0.15
  • Database Driver & Version: n/a

Description:

Specifying an alternative channel to send a slack notification to, does not work. Probably linked to #34 from back in 2020.

Steps To Reproduce:

  • Set up Slack integration as per L8 doco
  • Create a notification to be sent to a different channel than specified in the app
  • Notification gets sent to first channel.
// The app is set to send to a channel named #test-channel, but I want to send to #general
return (new SlackMessage())
            ->from('Ghost', ':ghost:')
            ->to('#general')
            ->content('This will be sent to #general');

Demo

https://github.com/ok200paul/l8-slack-channel-bug-report

@driesvints
Copy link
Member

You mention creating an app but we don't support that atm. Only incoming webhooks.

@driesvints
Copy link
Member

Hmm, I'll try to have a look at this to see if we can support apps as well. For now I don't think this will work sorry.

@ok200paul
Copy link
Author

ok200paul commented Feb 3, 2022

Hi Dries - not looking to reopen this, however, the doco mentions that we need to create a slack app for the integration to work, so yeah, we create an app. Does the doco needs to be updated? I might have been following them a little too closely if creating an app is not required! Doco screengrab:

image

The slack documentation indicates that we're (nowadays) unable to send incoming webhooks without setting up a slack app

@driesvints
Copy link
Member

Hey @ok200paul, you're correct. It seems we updated those docs incorrectly. I've sent in a PR to revert this as this currently doesn't work: laravel/docs#7651.

Like I said, I'll be looking into modernising the package hopefully soon so Slack Apps are supported as well.

@ok200paul
Copy link
Author

ok200paul commented Feb 4, 2022 via email

@driesvints
Copy link
Member

@ok200paul we've decided to leave the current docs in place and just note the methods that don't work with Slack apps. It looks that you can't use from and to with Slack Apps right now. Should you figure out a way on how to do that we'd welcome PR's for it.

@ok200paul
Copy link
Author

Will do, thanks Dries!

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