Skip to main content

admit

Function admit 

pub fn admit(
    caller: &Caller,
    appearance: &Appearance,
    allows_personas: impl FnOnce(&str) -> bool,
    avatar: impl FnOnce(&str) -> Option<Vec<u8>>,
) -> Result<Appearance, ActionHostError>
Expand description

Admit appearance on a request from caller, for the room-action door: only a bot whose installation allows_personas may show another name, the appearance must be valid, and its avatar must be an image avatar finds in the room’s content store under its own hash.

§Errors

crate::remote::ActionHostError::Refused for a caller that may not show another name; crate::remote::ActionHostError::InvalidRequest for an invalid appearance or avatar.