Project

General

Profile

Actions

Feature #12291

closed

Support for Slack notifications

Added by Viktor Gurov over 3 years ago. Updated almost 3 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Viktor Gurov
Category:
Notifications
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Plus Target Version:
22.01
Release Notes:
Default

Description

it would be nice to add Slack notifications
sample code:

function sendSlackMessage($message)
{
    $ch = curl_init("https://slack.com/api/chat.postMessage");
    $data = http_build_query([
        "token" => "YOUR_API_TOKEN",
        "channel" => '#random',
        "text" => $message,
        "username" => "John Doe",
    ]);
    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
    curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
    $result = curl_exec($ch);
    curl_close($ch);

    return $result;
}

Actions #2

Updated by Jim Pingle about 3 years ago

  • Status changed from New to Pull Request Review
  • Assignee set to Viktor Gurov
  • Target version set to CE-Next
  • Plus Target Version set to Plus-Next
Actions #3

Updated by Viktor Gurov about 3 years ago

  • Status changed from Pull Request Review to Feedback

Merged

Actions #4

Updated by Jim Pingle about 3 years ago

  • Target version changed from CE-Next to 2.6.0
  • Plus Target Version changed from Plus-Next to 22.01
Actions #5

Updated by Jim Pingle about 3 years ago

  • Subject changed from Slack notifications to Support for Slack notifications

Updating subject for release notes.

Actions #6

Updated by Christopher Cope almost 3 years ago

Tested with

2.6.0-RC (amd64)
built on Wed Jan 12 20:10:43 UTC 2022
FreeBSD 12.3-STABLE

It works successfully with both user & bot tokens.

Actions #7

Updated by Viktor Gurov almost 3 years ago

  • Status changed from Feedback to Resolved
Actions

Also available in: Atom PDF