Changeset 11786
- Timestamp:
- 04/25/2022 10:24:36 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/common/includes/slack/props/lib.php
r11783 r11786 71 71 } 72 72 73 $giver_user = map_slack_users_to_wporg( array( $request->event->user ) )[0]; 73 $giver_user = map_slack_users_to_wporg( array( $request->event->user ) ); 74 $giver_user = array_pop( $giver_user ); 74 75 $recipient_slack_ids = get_recipient_slack_ids( $request->event->blocks ); 76 77 // You have to have a w.org account to have a Slack account, so this should always be populated. 78 // The 'Received props from @...' would be broken if the giver can't be found. 79 // Don't throw if a recipient lookup fails, since we still want other recipients to get props. 80 if ( empty( $giver_user ) ) { 81 throw new Exception( 'w.org user lookup for slack ID '. $request->event->user .' failed' ); 82 } 75 83 76 84 if ( empty( $recipient_slack_ids ) ) {
Note: See TracChangeset
for help on using the changeset viewer.