Make snapshot for Notification come before Video
parent
f6ebf13b17
commit
0444dc9889
|
|
@ -66,6 +66,28 @@ module.exports = function(s,config,lang,getSnapshot){
|
||||||
clearTimeout(s.group[d.ke].activeMonitors[d.id].detector_discordbot);
|
clearTimeout(s.group[d.ke].activeMonitors[d.id].detector_discordbot);
|
||||||
s.group[d.ke].activeMonitors[d.id].detector_discordbot = null
|
s.group[d.ke].activeMonitors[d.id].detector_discordbot = null
|
||||||
},detector_discordbot_timeout)
|
},detector_discordbot_timeout)
|
||||||
|
await getSnapshot(d,monitorConfig)
|
||||||
|
if(d.screenshotBuffer){
|
||||||
|
sendMessage({
|
||||||
|
author: {
|
||||||
|
name: s.group[d.ke].rawMonitorConfigurations[d.id].name,
|
||||||
|
icon_url: config.iconURL
|
||||||
|
},
|
||||||
|
title: lang.Event+' - '+d.screenshotName,
|
||||||
|
description: lang.EventText1+' '+d.currentTimestamp,
|
||||||
|
fields: [],
|
||||||
|
timestamp: d.currentTime,
|
||||||
|
footer: {
|
||||||
|
icon_url: config.iconURL,
|
||||||
|
text: "Shinobi Systems"
|
||||||
|
}
|
||||||
|
},[
|
||||||
|
{
|
||||||
|
attachment: d.screenshotBuffer,
|
||||||
|
name: d.screenshotName+'.jpg'
|
||||||
|
}
|
||||||
|
],d.ke)
|
||||||
|
}
|
||||||
if(monitorConfig.details.detector_discordbot_send_video === '1'){
|
if(monitorConfig.details.detector_discordbot_send_video === '1'){
|
||||||
let videoPath = null
|
let videoPath = null
|
||||||
let videoName = null
|
let videoName = null
|
||||||
|
|
@ -102,28 +124,6 @@ module.exports = function(s,config,lang,getSnapshot){
|
||||||
],d.ke)
|
],d.ke)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
await getSnapshot(d,monitorConfig)
|
|
||||||
if(d.screenshotBuffer){
|
|
||||||
sendMessage({
|
|
||||||
author: {
|
|
||||||
name: s.group[d.ke].rawMonitorConfigurations[d.id].name,
|
|
||||||
icon_url: config.iconURL
|
|
||||||
},
|
|
||||||
title: lang.Event+' - '+d.screenshotName,
|
|
||||||
description: lang.EventText1+' '+d.currentTimestamp,
|
|
||||||
fields: [],
|
|
||||||
timestamp: d.currentTime,
|
|
||||||
footer: {
|
|
||||||
icon_url: config.iconURL,
|
|
||||||
text: "Shinobi Systems"
|
|
||||||
}
|
|
||||||
},[
|
|
||||||
{
|
|
||||||
attachment: d.screenshotBuffer,
|
|
||||||
name: d.screenshotName+'.jpg'
|
|
||||||
}
|
|
||||||
],d.ke)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const onTwoFactorAuthCodeNotificationForDiscord = function(r){
|
const onTwoFactorAuthCodeNotificationForDiscord = function(r){
|
||||||
|
|
|
||||||
|
|
@ -149,6 +149,13 @@ module.exports = function(s,config,lang,getSnapshot){
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
await getSnapshot(d,monitorConfig)
|
||||||
|
sendMail([
|
||||||
|
{
|
||||||
|
filename: d.screenshotName + '.jpg',
|
||||||
|
content: d.screenshotBuffer
|
||||||
|
}
|
||||||
|
])
|
||||||
if(monitorConfig.details.detector_mail_send_video === '1'){
|
if(monitorConfig.details.detector_mail_send_video === '1'){
|
||||||
let videoPath = null
|
let videoPath = null
|
||||||
let videoName = null
|
let videoName = null
|
||||||
|
|
@ -188,13 +195,6 @@ module.exports = function(s,config,lang,getSnapshot){
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
await getSnapshot(d,monitorConfig)
|
|
||||||
sendMail([
|
|
||||||
{
|
|
||||||
filename: d.screenshotName + '.jpg',
|
|
||||||
content: d.screenshotBuffer
|
|
||||||
}
|
|
||||||
])
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -150,6 +150,13 @@ module.exports = function (s, config, lang, getSnapshot) {
|
||||||
}),
|
}),
|
||||||
},files || [],d.ke)
|
},files || [],d.ke)
|
||||||
}
|
}
|
||||||
|
await getSnapshot(d,monitorConfig)
|
||||||
|
sendMail([
|
||||||
|
{
|
||||||
|
filename: d.screenshotName + '.jpg',
|
||||||
|
content: d.screenshotBuffer
|
||||||
|
}
|
||||||
|
])
|
||||||
if(monitorConfig.details.detector_mail_send_video === '1'){
|
if(monitorConfig.details.detector_mail_send_video === '1'){
|
||||||
let videoPath = null
|
let videoPath = null
|
||||||
let videoName = null
|
let videoName = null
|
||||||
|
|
@ -178,13 +185,6 @@ module.exports = function (s, config, lang, getSnapshot) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
await getSnapshot(d,monitorConfig)
|
|
||||||
sendMail([
|
|
||||||
{
|
|
||||||
filename: d.screenshotName + '.jpg',
|
|
||||||
content: d.screenshotBuffer
|
|
||||||
}
|
|
||||||
])
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -68,6 +68,19 @@ module.exports = function(s,config,lang,getSnapshot){
|
||||||
clearTimeout(s.group[d.ke].activeMonitors[d.id].detector_telegrambot);
|
clearTimeout(s.group[d.ke].activeMonitors[d.id].detector_telegrambot);
|
||||||
s.group[d.ke].activeMonitors[d.id].detector_telegrambot = null
|
s.group[d.ke].activeMonitors[d.id].detector_telegrambot = null
|
||||||
},detector_telegrambot_timeout)
|
},detector_telegrambot_timeout)
|
||||||
|
await getSnapshot(d,monitorConfig)
|
||||||
|
if(d.screenshotBuffer){
|
||||||
|
sendMessage({
|
||||||
|
title: lang.Event+' - '+d.screenshotName,
|
||||||
|
description: lang.EventText1+' '+d.currentTimestamp,
|
||||||
|
},[
|
||||||
|
{
|
||||||
|
type: 'photo',
|
||||||
|
attachment: d.screenshotBuffer,
|
||||||
|
name: d.screenshotName+'.jpg'
|
||||||
|
}
|
||||||
|
],d.ke)
|
||||||
|
}
|
||||||
if(monitorConfig.details.detector_telegrambot_send_video === '1'){
|
if(monitorConfig.details.detector_telegrambot_send_video === '1'){
|
||||||
// await asyncSetTimeout(3000)
|
// await asyncSetTimeout(3000)
|
||||||
let videoPath = null
|
let videoPath = null
|
||||||
|
|
@ -96,19 +109,6 @@ module.exports = function(s,config,lang,getSnapshot){
|
||||||
],d.ke)
|
],d.ke)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
await getSnapshot(d,monitorConfig)
|
|
||||||
if(d.screenshotBuffer){
|
|
||||||
sendMessage({
|
|
||||||
title: lang.Event+' - '+d.screenshotName,
|
|
||||||
description: lang.EventText1+' '+d.currentTimestamp,
|
|
||||||
},[
|
|
||||||
{
|
|
||||||
type: 'photo',
|
|
||||||
attachment: d.screenshotBuffer,
|
|
||||||
name: d.screenshotName+'.jpg'
|
|
||||||
}
|
|
||||||
],d.ke)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const onTwoFactorAuthCodeNotificationForTelegram = function(r){
|
const onTwoFactorAuthCodeNotificationForTelegram = function(r){
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue