Changeset 12761
- Timestamp:
- 07/26/2023 07:13:49 AM (3 years ago)
- Location:
- sites/trunk/common/includes/slack/announce
- Files:
-
- 2 edited
-
config.php (modified) (1 diff)
-
lib.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/common/includes/slack/announce/config.php
r12738 r12761 96 96 'sippis', 97 97 ), 98 'contributor-mentorship' => $wordcamp_central, 98 99 'core' => array_merge( get_committers(), array( 99 100 'amykamala', // @amy kamala on Slack -
sites/trunk/common/includes/slack/announce/lib.php
r12738 r12761 143 143 $root = 'contributor-mentorship'; 144 144 break; 145 case 'contributor': // Such as #contributor-mentorship146 145 case 'community': 147 146 $root = 'community-team'; … … 173 172 } 174 173 175 // Recurse, in case the parent channel has a parent channel.176 // ie. #mentorship-cohort-july-2023 => #contributor-mentorship => #community-team177 foreach ( $parent_channels as $parent_channel ) {178 $parent_channels = array_merge( $parent_channels, get_parent_channels( $parent_channel ) ?: [] );179 }180 181 174 return array_unique( $parent_channels ) ?: false; 182 175 } … … 291 284 } 292 285 286 // Don't send to these parent channels. 287 $dont_send_to = [ 288 'contributor-mentorship', 289 ]; 290 293 291 $text = $data['text']; 294 292 // Remove any @here or @channel … … 299 297 300 298 foreach ( $parent_channels as $parent_channel ) { 299 if ( in_array( $parent_channel, $dont_send_to, true ) ) { 300 continue; 301 } 302 301 303 $send->set_text( 'In #' . $channel . ': ' . $text ); 302 304 $send->send( '#' . $parent_channel );
Note: See TracChangeset
for help on using the changeset viewer.