And from the plugin you shared, there is this gem...
$message = "Hey, I'm ya mirror, and I tell ya, there is still much work to do in ya soul";
(new ConversationModel())->save([
'Body' => str_replace('%%NAME%%', $name, $message),
'Format' => 'Html',
'InsertUserID' => c('RegistrationMessage.User', Gdn::userModel()->getSystemUserID()),
'RecipientUserID' => [Gdn::Session()->UserID]
]);
And being me I put it in this function to test super rigorously, oh dear!
Comments
Could be a start
https://open.vanillaforums.com/addon/registrationmessage-plugin
Excellent find @Kaspar I have been searching for this stuff for my integrated chat room.
Here was my earlier pursuit https://open.vanillaforums.com/discussion/37020/how-to-send-vanilla-notifications-via-api
And from the plugin you shared, there is this gem...
And being me I put it in this function to test super rigorously, oh dear!