Changeset 13748
- Timestamp:
- 05/23/2024 01:06:52 AM (2 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/common/includes/slack/announce/lib.php
r12761 r13748 45 45 46 46 foreach ( (array) $parent_channels as $parent ) { 47 48 49 50 51 47 52 $users = array_merge( $users, $whitelist[ $parent ] ?? [] ); 48 53 } … … 133 138 // Some channels parents are not a 1:1 match. 134 139 switch ( $root ) { 135 case 'accessibility':136 140 case 'design': 137 141 case 'feature': 138 142 case 'performance': 139 143 case 'tide': 144 140 145 $root = 'core'; 141 146 break; … … 153 158 } 154 159 155 // No parent channel!156 if ( $root === $channel ) {157 return false;158 }159 160 160 $parent_channels = []; 161 161 162 162 // For when a channel has multiple parents. 163 switch ( $channel ) { 164 case 'meta-learn': 165 $parent_channels[] = 'training'; 166 // Intentional Fallthrough. 167 default: 168 // Is it an actual channel? Assume that there'll always be at least one whitelisted user for the parent channel. 169 if ( get_whitelist_for_channel( $root ) ) { 170 $parent_channels[] = $root; 171 } 163 164 // Accessibility is a sub-team of Core, but is a parent channel itself. 165 if ( 'accessibility' === $root ) { 166 $parent_channels[] = 'core'; 167 } 168 169 // Learn is a sub-team of Training, plus of #meta. 170 if ( 'meta-learn' === $channel ) { 171 $parent_channels[] = 'training'; 172 } 173 174 // Is it an actual channel? Assume that there'll always be at least one whitelisted user for the parent channel. 175 if ( 176 $root !== $channel && 177 get_whitelist_for_channel( $root ) 178 ) { 179 $parent_channels[] = $root; 172 180 } 173 181
Note: See TracChangeset
for help on using the changeset viewer.