apps/comments/lib/Notification/Listener.php
/**
	 * flattens the mention array returned from comments to a list of user ids.
	 *
	 * @param array $mentions
	 * @return string[] containing the mentions, e.g. ['alice', 'bob']
	 */
flattens the mention array returned from comments to a list of user ids.
@param array $mentions
@return string[] containing the mentions, e.g.
flattens the mention array returned from comments to a list of user ids . @param array $mentions @return string [] containing the mentions e . g .
public function extractMentions(array $mentions) {
		if(empty($mentions)) {
			return [];
		}
		$uids = [];
		foreach($mentions as $mention) {
			if($mention['type'] === 'user') {
				$uids[] = $mention['id'];
			}
		}
		return $uids;
	}
public function extractMentions ( array $ mentions ) { if ( empty ( $ mentions ) ) { return [ ] ; } $ uids = [ ] ; foreach ( $ mentions as $ mention ) { if ( $ mention [ 'type' ] === 'user' ) { $ uids [ ] = $ mention [ 'id' ] ; } } return $ uids ; }
flattens the mention array returned from comments to a list of user ids.
flattens the mention array returned from comments to a list of user ids .