JWT Private Message Disable/Enable

Disable send private message option button based on token features data.

Hide private message if local participant isGuest and features based on token.
When enableFeaturesBasedOnToken is enabled we were not hiding the private message button for guests.

You can update your JWT token in this example;

<?php
require_once 'vendor/autoload.php';
use \Firebase\JWT\JWT;

$LINK = "https://meet.mydomain.com";
$ROOM = "myroom";

$key = "mysecret";
$payload = array(
    "aud" => "myapp",
    "iss" => "myapp",
    "sub" => "meet.mydomain.com",
    "exp" => time() + (60*60),
    "room" => "$ROOM",
    "moderator" => true,
    "context" => array(
        "user" => array(
            "name" => "username",
            "email" => "username@mydomain.com",
            "avatar" => "https://gravatar.com/avatar/abc123.png"
        ),
        "features" => array(
            "private-message" => false,
        )
    )
);

Code updates;

4 Likes