pub async fn add_recent_sticker<C: AsRef<AddRecentSticker>>(
        &self,
        add_recent_sticker: C,
    ) -> RTDResult<Stickers> {
        let extra = add_recent_sticker.as_ref().extra().ok_or(NO_EXTRA)?;
        let signal = OBSERVER.subscribe(&extra);
        self.tdlib_client
            .send(self.get_client_id()?, add_recent_sticker.as_ref())?;
        let received = signal.await;
        OBSERVER.unsubscribe(&extra);
        match received {
            Err(_) => Err(CLOSED_RECEIVER_ERROR),
            Ok(v) => match v {
                TdType::Stickers(v) => Ok(v),
                TdType::Error(v) => Err(RTDError::TDLibError(v)),
                _ => {
                    log::error!("invalid response received: {:?}", v);
                    Err(INVALID_RESPONSE_ERROR)
                }
            },
        }
    }
// Manually adds a new sticker to the list of recently used stickers. The new sticker is added to the top of the list. If the sticker was already in the list, it is removed from the list first. Only stickers belonging to a sticker set can be added to this list
Manually adds a new sticker to the list of recently used stickers. The new sticker is added to the top of the list. If the sticker was already in the list, it is removed from the list first. Only stickers belonging to a sticker set can be added to this list
Manually adds a new sticker to the list of recently used stickers . The new sticker is added to the top of the list . If the sticker was already in the list it is removed from the list first . Only stickers belonging to a sticker set can be added to this list
pub async fn add_recent_sticker<C: AsRef<AddRecentSticker>>(
        &self,
        add_recent_sticker: C,
    ) -> RTDResult<Stickers> {
        let extra = add_recent_sticker.as_ref().extra().ok_or(NO_EXTRA)?;
        let signal = OBSERVER.subscribe(&extra);
        self.tdlib_client
            .send(self.get_client_id()?, add_recent_sticker.as_ref())?;
        let received = signal.await;
        OBSERVER.unsubscribe(&extra);
        match received {
            Err(_) => Err(CLOSED_RECEIVER_ERROR),
            Ok(v) => match v {
                TdType::Stickers(v) => Ok(v),
                TdType::Error(v) => Err(RTDError::TDLibError(v)),
                _ => {
                    log::error!("invalid response received: {:?}", v);
                    Err(INVALID_RESPONSE_ERROR)
                }
            },
        }
    }
pub async fn add_recent_sticker < C : AsRef < AddRecentSticker > > ( & self , add_recent_sticker : C , ) -> RTDResult < Stickers > { let extra = add_recent_sticker . as_ref ( ) . extra ( ) . ok_or ( NO_EXTRA ) ? ; let signal = OBSERVER . subscribe ( & extra ) ; self . tdlib_client . send ( self . get_client_id ( ) ? , add_recent_sticker . as_ref ( ) ) ? ; let received = signal . await ; OBSERVER . unsubscribe ( & extra ) ; match received { Err ( _ ) => Err ( CLOSED_RECEIVER_ERROR ) , Ok ( v ) => match v { TdType :: Stickers ( v ) => Ok ( v ) , TdType :: Error ( v ) => Err ( RTDError :: TDLibError ( v ) ) , _ => { log :: error ! ( " " v ) ; Err ( INVALID_RESPONSE_ERROR ) } } , } }
Manually adds a new sticker to the list of recently used stickers.
Manually adds a new sticker to the list of recently used stickers .
&self
add_recent_sticker
C
&self
add_recent_sticker
C