Merge branch 'bugfix/events_reference_error' into 'dev'

Add references to method signatures to fix reference errors.

See merge request Shinobi-Systems/Shinobi!265
mitchross-coral-installer-update
Moe 2021-01-07 22:57:53 +00:00
commit 4f6bf2ef9f
1 changed files with 4 additions and 4 deletions

View File

@ -282,7 +282,7 @@ module.exports = (s,config,lang,app,io) => {
}
return true
}
const runMultiTrigger = (monitorConfig,eventDetails) => {
const runMultiTrigger = (monitorConfig,eventDetails, d, triggerEvent) => {
s.getCamerasForMultiTrigger(monitorConfig).forEach(function(monitor){
if(monitor.mid !== d.id){
triggerEvent({
@ -314,11 +314,11 @@ module.exports = (s,config,lang,app,io) => {
}
return true
}
const runEventExecutions = async (eventTime,monitorConfig,eventDetails,forceSave,filter,d) => {
const runEventExecutions = async (eventTime,monitorConfig,eventDetails,forceSave,filter,d, triggerEvent) => {
const monitorDetails = monitorConfig.details
const detailString = JSON.stringify(eventDetails)
if(monitorDetails.det_multi_trig === '1'){
runMultiTrigger(monitorConfig,eventDetails)
runMultiTrigger(monitorConfig,eventDetails, d, triggerEvent)
}
//save this detection result in SQL, only coords. not image.
if(forceSave || (filter.save && monitorDetails.detector_save === '1')){
@ -572,7 +572,7 @@ module.exports = (s,config,lang,app,io) => {
monitorDetails.detector_use_motion === '0' ||
d.doObjectDetection !== true
){
runEventExecutions(eventTime,monitorConfig,eventDetails,forceSave,filter,d)
runEventExecutions(eventTime,monitorConfig,eventDetails,forceSave,filter,d, triggerEvent)
}
//show client machines the event
s.tx({