Removing MQTT message inbound.

pull/25/head
Stephen Vanderwarker 6 months ago
parent 4045b29b72
commit b2444eb609
Signed by: stephen
GPG Key ID: EF429EF847868C14

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