pub async fn publish_wallpaper(
chat_npub: &str,
blur: u8,
dim: u8,
) -> Result<(), String>Expand description
Publish the current preview file as the chat’s wallpaper. Encrypts +
uploads to Blossom, builds the kind-30078 rumor, sends to the
counterparty (the gift-wrap helper fans out to self for cross-device
sync), promotes the preview file to the active slot, updates STATE +
DB, drops a WallpaperChanged system event, and emits
wallpaper_updated to the frontend.
blur and dim are the customisation knobs the user set on the
preview slider — clamped here to safe ranges and carried as optional
tags on the rumor so older clients without slider support still get a
usable wallpaper (falling back to their own defaults).