Making WordPress.org

Changeset 2157


Ignore:
Timestamp:
12/03/2015 06:06:50 PM (9 years ago)
Author:
nbachiyski
Message:

Slack: remove whitelist for props command

Let's open it up and see how it goes. Default to open :-)

Location:
sites/trunk/common/includes/slack/props
Files:
1 deleted
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/common/includes/slack/props/lib.php

    r2154 r2157  
    44use Dotorg\Slack\Send;
    55
    6 require_once __DIR__ . '/config.php';
    7 
    86function show_error( $user ) {
    9     if ( ! in_array( $user, get_whitelist() ) ) {
    10         echo "You are not allowed to use /props.\n\n";
    11         printf( "If you are a team lead and need to be whitelisted, contact an admin in <#%s|%s> for assistance.", SLACKHELP_CHANNEL_ID, SLACKHELP_CHANNEL_NAME );
    12         return;
    13     }
    14 
    157    echo 'Please use `/props SLACK_USERNAME MESSAGE` to give props.';
    168}
     
    2517
    2618    if ( empty( $data['text'] ) ) {
    27         show_error( $sender );
    28         return;
    29     }
    30 
    31     if ( ! in_array( $sender, get_whitelist() ) ) {
    3219        show_error( $sender );
    3320        return;
Note: See TracChangeset for help on using the changeset viewer.