Comply with latest XEP-0166, XEP-0167, XEP-0176.