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}` });