forked from vxmppb/vxmppb
Removing MQTT message inbound.
This commit is contained in:
parent
4045b29b72
commit
b2444eb609
14
index.js
14
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}`
|
||||
});
|
||||
|
|
Reference in New Issue
Block a user