Skip to main content

apply_received_wallpaper

Function apply_received_wallpaper 

Source
pub async fn apply_received_wallpaper(
    chat_npub: &str,
    sender_npub: &str,
    created_at: u64,
    url: &str,
    decryption_key: &str,
    decryption_nonce: &str,
    plaintext_hash: Option<&str>,
    mime: Option<&str>,
    blur: Option<u8>,
    dim: Option<u8>,
    rumor_event_id: &str,
) -> Result<(), String>
Expand description

Apply a received wallpaper rumor. Drops the rumor if its timestamp is not newer than the chat’s current wallpaper_ts (latest-write-wins). On a fresh rumor: downloads + decrypts the Blossom blob, caches it locally, updates STATE + DB, saves a WallpaperChanged system event, and emits wallpaper_updated to the frontend.