public function setTyping($id, $message, $botName = null, $fromUser = false, $fromAdmin = 0)
    {
        if ($this->isEmptyId($id)) {
            throw new InvalidArgumentException;
        }

        $params = [
            'body' => $message
        ];

        if ($botName) {
            $params['bot_name'] = $botName;
        }

        $fromUser = (bool)$fromUser;
        if ($fromUser) {
            $params['from_user'] = $fromUser;
        }

        $fromAdmin = (int)$fromAdmin;
        if ($fromAdmin) {
            $params['from_admin'] = $fromAdmin;
        }

        $res = $this->call('conversations/' . $id . '/settyping', $params, 'post');

        if ($res) {
            return true;
        }

        return false;
    }
public function setTyping($id, $message, $botName = null, $fromUser = false, $fromAdmin = 0)
    {
        if ($this->isEmptyId($id)) {
            throw new InvalidArgumentException;
        }

        $params = [
            'body' => $message
        ];

        if ($botName) {
            $params['bot_name'] = $botName;
        }

        $fromUser = (bool)$fromUser;
        if ($fromUser) {
            $params['from_user'] = $fromUser;
        }

        $fromAdmin = (int)$fromAdmin;
        if ($fromAdmin) {
            $params['from_admin'] = $fromAdmin;
        }

        $res = $this->call('conversations/' . $id . '/settyping', $params, 'post');

        if ($res) {
            return true;
        }

        return false;
    }
public function setTyping ( $ id , $ message , $ botName = null , $ fromUser = false , $ fromAdmin = 0 ) { if ( $ this -> isEmptyId ( $ id ) ) { throw new InvalidArgumentException ; } $ params = [ 'body' => $ message ] ; if ( $ botName ) { $ params [ 'bot_name' ] = $ botName ; } $ fromUser = ( bool ) $ fromUser ; if ( $ fromUser ) { $ params [ 'from_user' ] = $ fromUser ; } $ fromAdmin = ( int ) $ fromAdmin ; if ( $ fromAdmin ) { $ params [ 'from_admin' ] = $ fromAdmin ; } $ res = $ this -> call ( 'conversations/' . $ id . '/settyping' , $ params , 'post' ) ; if ( $ res ) { return true ; } return false ; }
Set typing message in conversation.

@param int $id - conversation ID
@param string $message
@param string $botName
@param bool $fromUser
@param int $fromAdmin

@return bool

@throws InvalidArgumentException
@throws Exception
Set typing message in conversation .