public function participantsUserIds($userId = null)
    {
        $users = $this->participants()->lists('user_id');

        if ($userId) {
            $users[] = $userId;
        }

        return $users;
    }
public function participantsUserIds($userId = null)
    {
        $users = $this->participants()->lists('user_id');

        if ($userId) {
            $users[] = $userId;
        }

        return $users;
    }
public function participantsUserIds ( $ userId = null ) { $ users = $ this -> participants ( ) -> lists ( 'user_id' ) ; if ( $ userId ) { $ users [ ] = $ userId ; } return $ users ; }
Returns an array of user ids that are associated with the thread

@param null $userId
@return array
Returns an array of user ids that are associated with the thread