jid to chat_id, leave function