Added a check in Mailbox preRemove hook call. If the hook is returnin…#203
Conversation
|
I documented the hook mailbox_purge_preRemove on the wiki page which was missing completely. |
|
I'm not sure I like the idea of plugins being able to prevent deletion. Have we done this anywhere else? My issue is if we have >1 plugin and the other plugins do their pre-deletion work on the assumption it'll succeed, then your plugin cancels the deletion, we'll have a potentially inconsistent state. The answer may be just to document this and for plugins that do irreversible pre-deletion tasks to use the Can you add some documentation to the call covering the above and - also - reverse the styling changes you made? Styling should be consistent to the rest of the file. Thanks a million. |
…g a false, stop the deletion of the mailbox. The plugin has to add a message why the deletion of the mailbox was canceled.
e50691d to
9d9b0b4
Compare
|
yes, the alias deletion has the same logic in. That is how I understood the hooks, pre is there to do checks before the action is executed and post after the action as executed, please correct me if I understood there something wrong. Therefor I see it very logic that a pre check should be able to stop the action if required. I updated the wiki. Sorry for the style change, me IDE is doing it automatically, I reverted it. |
|
I add a new part to the hook documentation: Hopefully that describes it a little better. Suggestions are welcome ;) |
|
Cheers @idefix6 - merging now. |
…g a false, stop the deletion of the mailbox. The plugin has to add a message why the deletion of the mailbox was canceled.
This change is required to further implement pull request #179