now we handle invites using the same sync idioms as with normal messages
the handler callback API is a poor fit for Rust lifetimes, so avoid it when possible