Changing watch state of a thread for a specific user

Status
This content is read-only, or is not open for further replies.

Edman

Guest
offline
A user has selected to watch all threads that they create and post in.

When I create a new post in a thread, the thread gets watched for that specific user

Code:

Code:
        $thread = \XF::em()->find('XF:Thread', $threadid);
        $user = \XF::em()->find('XF:User', $userid);
        $post = \XF::asVisitor($user, function() use ($thread, $message)
        {
            $creator = \XF::service('XF:Thread\Replier', $thread);
            $creator->setMessage($message)...

Read more

Continue reading...
 
Liked by:
Status
This content is read-only, or is not open for further replies.
Top Bottom