This repository was archived by the owner on Mar 27, 2018. It is now read-only.

Description
Yes, I know there's a caveat emptor that says it's a sample and not fit for production use...
I think the guard in adjustFormSubmitTrigger before setting existingTrigger should be conjoined with:
triggers[i].getHandlerFunction() == 'respondToFormSubmit'
If a form has multiple handlers responding to formSubmit then I think it's possible for a formSubmit handler other than the one from notifications-addon to be deleted.
Obviously the extra guard won't help if the handlers have the same name, so they should probably be informally namespaced (for example, 'notificationsRespondToFormSubmit').
The only other way I can see to avoid this problem would be to have each handler script owned by a different user so getUserTriggers only returns one formSubmit trigger.
Let me know if I'm missing or misunderstanding something.