Compare commits

..

No commits in common. "ab2cc085a3a022517f8081c4b0053834d285d84c" and "49015f3263931407566afdb0dcccd6b571b444ac" have entirely different histories.

3 changed files with 3 additions and 6 deletions

@ -43,8 +43,7 @@ host=wss://your-xmpp-server
user=your_xmpp_username
domain=your_xmpp_domain
password=your_xmpp_password
; optional (will default to nostrsms-bot)
resource=nostrsms-bot
resource=bot
[relays]
read=wss://relay.example.com

@ -2,7 +2,6 @@
domain =
host =
password =
# optional (will default to nostrsms-bot)
resource =
user =

@ -46,7 +46,7 @@ if (fs.existsSync(configPath)) {
const xmpp = client({
service: config.xmpp.host,
domain: config.xmpp.domain,
resource: config.xmpp.resource || 'nostrsms-bot',
resource: config.xmpp.resource || 'bot',
username: config.xmpp.user,
password: config.xmpp.password,
});
@ -70,8 +70,7 @@ if (fs.existsSync(configPath)) {
// check for chat messages
if (stanza.is('message') && stanza.attrs.type === 'chat') {
// store from jid, and message contents
const rawfrom = stanza.attrs.from;
const from = rawfrom.split('/')[0];
const from = stanza.attrs.from;
const body = stanza.getChildText('body');
// show them to the user in console