Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Are private messages viewable by admins?



  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP

    You can create a plugin where the admin is always added to the conversation.

  • Options

    Thanks for the response Vrijvlinder. So it is possible to have 'private conversations' that aren't one on one?* Fantastic!

    I imagine by way of creating the plug in (a custom one)?

  • Options
    R_JR_J Ex-Fanboy Munich Admin

    Conversations in Vanilla can take part between multiple users. You can add a new user to a conversation at any time. To test this, create a test conversation between you and me and add vrijvlinder ;)

    If the possibility to add an admin whenever it is needed is not enough, it would be no hard work to create a plugin that does this automatically. You should look at those two lines from class.conversationmessagemodel.php:

             $this->EventArguments['Fields'] = $Fields;

    Here's what I would do:

    1. copy any simple plugin
    2. rename folder, file
    3. change PluginInfo array (if you do not how, read docs or look at 3-5 different plugins)
    4. delete anything between the class... brackets
    5. insert there public function ConversationMessageModel_BeforeSave_Handler ($Sender) { decho($Sender->EventArguments['Fields'], 'DEBUG', true); die;}
    6. activate that plugin
    7. login as some other user than the admin and create a conversation with anyone. save the DEBUG output
    8. login as some other user than the admin and create a conversation with admin and someone else. save the DEBUG output
    9. compore both outputs and learn what to do, with $Sender->EventArguments['Fields'] in order to add the admin user
    10. replace decho... die... in the plugin with &$Sender->EventArguments['Fields'] = whatever needs to be done
    11. test if it works

    But: that will add the admin every time to the conversation when a message is sent!
    a) I do not know if that is a problem (you have to test that) and
    b) this way, the admin will never, ever be able to leave a conversation: every new message in such a conversation will call him back in...

Sign In or Register to comment.