amend api to take in a xmpp client object instead of a factory function