Skip to content

Commit

Permalink
missed for preferred_lang
Browse files Browse the repository at this point in the history
  • Loading branch information
jibon57 committed Feb 2, 2024
1 parent d9c6baf commit 71529c9
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions src/Parameters/UserMetadataParameters.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ class UserMetadataParameters
* @var bool
*/
protected $recordWebcam = true;
/**
* @var string
*/
protected $preferredLang = null;
/**
* @var LockSettingsParameters
*/
Expand Down Expand Up @@ -81,6 +85,29 @@ public function setRecordWebcam(bool $recordWebcam): void
$this->recordWebcam = filter_var($recordWebcam, FILTER_VALIDATE_BOOLEAN);
}

/**
* @return string|null
*/
public function getPreferredLang(): ?string
{
return $this->preferredLang;
}

/**
* @param string $preferredLang
* For list of values please check:
* https://github.com/mynaparrot/plugNmeet-client/blob/main/src/helpers/languages.ts
* The value should be indicated as `code` in the above file
* example: es-ES Or bn-BD etc
* @return void
*/
public function setPreferredLang(string $preferredLang): void
{
if (!empty($preferredLang)) {
$this->preferredLang = $preferredLang;
}
}

/**
* @return LockSettingsParameters
*/
Expand Down Expand Up @@ -110,6 +137,10 @@ public function buildBody(): array
$body["profile_pic"] = $this->getProfilePic();
}

if (!empty($this->preferredLang)) {
$body["preferred_lang"] = $this->getPreferredLang();
}

if ($this->lockSettings !== null) {
$body["lock_settings"] = $this->getLockSettings()->buildBody();
}
Expand Down

0 comments on commit 71529c9

Please sign in to comment.