datitisev Did you run php flarum migrate? If not, next time your forum tries to migrate it will have an error because it'll try to create the column that you've already created.

Ah ok, no I did not do that! my fault 😁 I will make sure to remove the column and run so it doesn't cause issues later, thank you for the heads up.

datitisev I attempted to do this, and code blocks had an ugly script tag that wasn't getting removed for some reason so I gave up for today 😂

The triple grave accent ``` for large code blocks are working for slack since the two using the same markdown but single and double won't as they are not a part of slack mrkdwn. I guess it would be more work than its worth to try and convert bbcode/markdown or html to slack specific mrkdwn unless someone already had a reliable library that did it. For now in my posts I am just going to avoid using any bbcode/markdown that I know will trigger webhooks so things look pretty 🙂 Thanks for having a look into the idea! 😀

    ctml Well, it's not about the markdown - I tried using a library to convert the rendered HTML into Markdown but TextFormatter adds a JS script for the syntax highlighting that didn't want to be removed. I'll look into it some other time, but it's not a priority to me.

    Please add new line support for extra text! And something like ${link} so you can customize where the link is! Maybe even add custom embeds! Or add custom webhook support

    14 days later

    What does the user dropdown under: "Here you modify what events the webhook is fired on" means?

    I can chose between admins and everybody else

      danielunited There should be some text explaining that right above it. Unless you aren't on the latest version.

      img

      14 days later

      Maybe a workaround for the markdown would be to add an option to not send the post content itself... only user, discussion title, etc.

      Otherwise, I wonder how the flarum email notifications work. They get sent as HTML but without any formatting, maybe the same method could be leveraged for getting unformatted post content.

      14 days later

      0.5.0

      • NEW: Allow using Slack adapter with any URL for Slack-supported webhook endpoints on any service
      • NEW: Add option for transforming post content into plain (unformatted) text
      • NEW: Add option for limiting post content payload to a certain # of characters
      • Backend refactor of Actions to allow for some features mentioned above
        • If you or an extension adds actions/events to fof/webhooks, there are breaking changes
          • ignore method signature has changed

      Updating

      composer require fof/webhooks
      php flarum cache:clear
      10 days later

      This webhook is disabled because it doesn't have any events enabled, What does it mean and how can I solve it?

        CosmicLivest Once you create a webhook, you need to click the edit button to enable the events you want to receive hooks for.

        a month later

        does this work for discord posting when someone posts threads etc

          Puggo That is correct. You can set it up so when someone creates a discussion it'll post about it on a Discord channel.

            Puggo What doesn't work? What have you tried? You need to create a hook on Discord, copy its URL & put it into the extension's settings, and enable the Discussion Started event.

            not working for me, do you think i did something wrong?

            Puggo Sorry, I hadn't seen this message. You'll want to recreate the webhook as anyone with that URL from the screenshot will be able to send messages in that channel.

            Based on the screenshot, you didn't click the + icon to actually add the URL & service. Once you do that, you'll want to click the ✏️ button to edit it, and enable the events you want, e.g. "Discussion Started"

              if i could upload files i would, but i cannot.