shouldn't be the jid already parsed at this point? so that this is enough:
```javascript
(options.jid && options.jid.domain === host)
```