clonemeagain / osticket-slack

a Slack plugin for osTicket
MIT License
47 stars 34 forks source link

multiple instances failures #39

Open stecca21 opened 1 year ago

stecca21 commented 1 year ago

Although I can create multiple instances only the settings of the first instance are actually reviewed.

I have 2 different instances set up. Both use filtering. Instance 2 has a different filter and points to a different channel than instance 1.

Instance,channel,filter 1,1,1 2,2,2

If instance 1 is the only instance enabled anything that satisfies the filter in 1 results in two slack notifications to channel 1. If instances 1 and 2 are enabled anything that satisfies the filter in 1 results in two slack notifications to channel 1. If instance 2 is the only instance enabled anything that satisfies the filter in 2 does not result in a slack notification being sent.

I have confirmed that my filter in instance 2 is not the issue by testing it in instance 1 of the plugin. I have confirmed that my slack endpoint in instance 2 is not the issue by testing it in instance 1 of the plugin.

Looking at the code the bootstrap() function is always going to return the first active plugin instance because it's passing a null value to getPluginInstance.

joshin42 commented 1 year ago

I've encountered this too.

The first instance runs, not the second. And it is sorted on the instance name.

In my case, I'm trying to post to both Slack and Discord -J