diff --git a/lib/xmpp/index.js b/lib/xmpp/index.js index 04e4fcc..64e7a25 100644 --- a/lib/xmpp/index.js +++ b/lib/xmpp/index.js @@ -15,6 +15,10 @@ module.exports = (logger, config) => { const outgoing = require('../outgoing') this.jid = null + // prefer IPv4 connections + const dns = require('node:dns'); + dns.setDefaultResultOrder('ipv4first'); + // declare send chat/groupchat function this.send = async (to, message, type) => { logger.info(`Send ${type} message to ${to}`)