pub(crate) async fn message_load(&self, message_id: String) -> Result<Message<T>, WechatyError> {
        debug!("message_load(query = {})", message_id);
        let payload = self.messages().get(&message_id).cloned();
        match payload {
            Some(payload) => Ok(Message::new(message_id.clone(), self.clone(), Some(payload))),
            None => {
                let mut message = Message::new(message_id.clone(), self.clone(), None);
                if let Err(e) = message.ready().await {
                    return Err(e);
                }
                Ok(message)
            }
        }
    }
/// Load a message.
///
/// Use message store first, if the message cannot be found in the local store,
/// try to fetch from the puppet instead.
Load a message.
Use message store first, if the message cannot be found in the local store,
try to fetch from the puppet instead.
Load a message . Use message store first if the message cannot be found in the local store try to fetch from the puppet instead .
pub(crate) async fn message_load(&self, message_id: String) -> Result<Message<T>, WechatyError> {
        debug!("message_load(query = {})", message_id);
        let payload = self.messages().get(&message_id).cloned();
        match payload {
            Some(payload) => Ok(Message::new(message_id.clone(), self.clone(), Some(payload))),
            None => {
                let mut message = Message::new(message_id.clone(), self.clone(), None);
                if let Err(e) = message.ready().await {
                    return Err(e);
                }
                Ok(message)
            }
        }
    }
pub ( crate ) async fn message_load ( & self , message_id : String ) -> Result < Message < T > , WechatyError > { debug ! ( " " message_id ) ; let payload = self . messages ( ) . get ( & message_id ) . cloned ( ) ; match payload { Some ( payload ) => Ok ( Message :: new ( message_id . clone ( ) , self . clone ( ) , Some ( payload ) ) ) , None => { let mut message = Message :: new ( message_id . clone ( ) , self . clone ( ) , None ) ; if let Err ( e ) = message . ready ( ) . await { return Err ( e ) ; } Ok ( message ) } } }
Load a message.
Load a message .
&self
message_id
String
&self
message_id
String