Announcements via Reference Parent

This commit is contained in:
Luis Fernando Molina committed 2019-12-25 17:30:32 +01:00
1 parent 0b02a10cb7
commit 21192c971c
1 file changed
+1 -4
+1 -4
View File
@@ -485,10 +485,7 @@
let socialBot = bot.SESSION.socialBots.bots[i]
try {
let code = JSON.parse(announcement.code)
if (code.botId === undefined) {
code.botId = socialBot.id
}
if (socialBot.type === code.botType && socialBot.id === code.botId) {
if (socialBot.id === announcement.referenceParent.id) {
if (socialBot.type === "Telegram Bot") {
if (announcement.formulaValue !== undefined) {
socialBot.botInstance.telegramAPI.sendMessage(socialBot.botInstance.chatId, announcement.formulaValue).catch(err => parentLogger.write(MODULE_NAME, "[WARN] initialize -> setUpSocialBots -> announce -> Telegram API error -> err = " + err))