From b2444eb609c0215738edc5785e4752165ee8b8f6 Mon Sep 17 00:00:00 2001 From: stephen Date: Thu, 26 May 2022 19:06:33 -0400 Subject: [PATCH] Removing MQTT message inbound. --- index.js | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/index.js b/index.js index be27973..b39b590 100755 --- a/index.js +++ b/index.js @@ -114,25 +114,15 @@ try { // setup friends list const friends = Object.keys(config.friends); - client.subscribe('phones/pixel2/media', function (err) { - if (!err) { - debug(); - } - }) - client.on('message', function (topic, payload) { - var nowPlaying = payload.toString() - console.log(nowPlaying) - xmpp.send(user_jid, nowPlaying) - }) - + xmpp.on('online', function (data, to) { // once we're online, we'll send a message alerting xmpp admins console.log('Connected with JID: ' + bot_jid); - xmpp.send(user_jid, "[ONLINE]", false); + //xmpp.send(user_jid, "[ONLINE]", false); // send mqtt online message client.publish(mqtt_topic, mqtt_message); // toot online message - if (mastodon_toots_enabled === "1"){ + if (mastodon_enabled === "1"){ M.post('statuses', { status: `${mastodon_toot}` });