Changeset 9228
- Timestamp:
- 10/24/2019 04:06:42 AM (5 years ago)
- Location:
- sites/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/api.wordpress.org/public_html/dotorg/slack/trac-bot.php
r4531 r9228 92 92 } 93 93 94 $slack->send( $parser->get_channel() );94 $slack->send( $parser->get_channel(), $parser->get_thread() ); 95 95 96 96 if ( $_POST['channel_name'] === 'test' ) { -
sites/trunk/common/includes/slack/send.php
r1788 r9228 101 101 } 102 102 103 function send( $channel ) {103 function send( $channel, $thread = false ) { 104 104 if ( $this->testing() ) { 105 105 $this->set_text( "[$channel] " . $this->get_text() ); … … 109 109 $payload = $this->get_payload(); 110 110 $payload['channel'] = $channel; 111 112 if ( $thread ) { 113 $payload['thread_ts'] = $thread; 114 115 // Setting this to true will broacast a threaded reply to the channel too. 116 // Since outgoing webhooks don't send the broadcast status, this is skipped for now. 117 // $payload['reply_broadcast'] = true; 118 } 111 119 112 120 # error_log( print_r( $payload, true ) ); -
sites/trunk/common/includes/slack/trac/bot.php
r4755 r9228 31 31 function get_channel() { 32 32 return '#' . $this->post_data['channel_name']; 33 } 34 35 function get_thread() { 36 return $this->post_data['thread_ts'] ?? false; 33 37 } 34 38
Note: See TracChangeset
for help on using the changeset viewer.