osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now
When is the “post reply” from agent event triggering?
I'm trying to figure out when exactly is the "post reply" from agent event triggering. I installed a plugin and set everything up listening to Signal::(model.update) event. Then I'm supposed to send user notification via Facebook when an agent replies to the users ticket. The problem is it is firing so many times.
It fires when user creates a ticket, when an agent opens the ticket, when the agent is writing something and, as far as I've noticed, twice when the agent actually clicks the "post reply" button!
So far I've figure out that the ticket has many methods where I can see whats actually in the database. Messing around with it (I think I tried all of them) I came across the $ticket->isAnswered() method, which becomes 1 only when the agent actually replies the first time, but then I have to deal with the last 2 times it triggers the Signal::(model.update) and ofcourse this won't work at all if the user replies to the same thread again.