The Kunena team has announce the arrival of Kunena 6.4.13 [6.4.13] in stable which is now available for download as a native Joomla extension for J! 5.4.x/6.0.x./6.1.x. This version addresses most of the issues that were discovered in K 6.2 / K 6.3 / K 6.4 and issues discovered during the last development stages of K 6.0 Hint: This version is primarily intended to facilitate an upgrade if Joomla was first updated to version 6.1 before Kunena was up to dated.
Please note: The Kunena project team takes NO responsibility for maintaining nor supporting anything in this category.
Question
onKunenaBeforeSave - how to prevent a message being posted?
I am currently writing a plugin which is using onKunenaBeforeSave to check the content of a message.
If he content is not approved by that check, I would like to abort the save and show a message to the user ("You are a spammer - bog off").
Showing a message is not a problem, but I don't see a clean way to abort the save? Even throwing a hard exception would still let the message save.
I am using Kunena 6.1.3.1.
Any help or insight would be very much appreciated.
I had a working way, but now the new Private Message function is throwing an error, when my plugins prevents the message of being posted. This happens because postPrivateMessage expects a $message->id which is not available, because there is no message.