Making WordPress.org


Ignore:
Timestamp:
02/02/2019 12:48:33 PM (6 years ago)
Author:
ocean90
Message:

Slack: The fallback field should not contain any markup and is therefore an invalid value for mrkdwn_in.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/common/includes/slack/trac/commit.php

    r8179 r8180  
    2828
    2929        $username = $this->trac->get_commit_username();
    30         $url      = $this->get_url();
    3130        $revision = 'r' . $this->id;
    3231        $author   = $this->author;
     
    3534        $attachment = [];
    3635
    37         $attachment['text']      = "*$username <$url|$revision> by $author*\n$message";
    38         $attachment['fallback']  = "$revision by $author: $message";
    39         $attachment['mrkdwn_in'] = [ 'text', 'fallback' ];
     36        $attachment['title']      = "$username $revision";
     37        $attachment['title_link'] = $this->get_url();
     38
     39        $attachment['author_name'] = $author;
     40        $attachment['author_icon'] = sprintf( 'https://wordpress.org/grav-redirect.php?user=%s&s=32', $author );
     41
     42        $attachment['text']      = $message;
     43        $attachment['fallback']  = "$username $revision by $author";
     44        $attachment['mrkdwn_in'] = [ 'text' ];
    4045
    4146        $attachment['ts']          = $this->created;
Note: See TracChangeset for help on using the changeset viewer.