from __future__ import annotations def parse_uid(uid: str, compat: bool = False) -> str: if uid.startswith("xmpp:"): return uid[5:] # Compat with uids of form "Name " if compat and ""): return uid[:-1].split("