Skip to content

Commit

Permalink
fixup! fixup! fixup! fixup! feat(calls): Add appconfig and user prefe…
Browse files Browse the repository at this point in the history
…rence for default setting of media
  • Loading branch information
nickvergessen committed Oct 8, 2024
1 parent f90b504 commit 0458d0d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -671,8 +671,11 @@ public function getGridVideosLimitEnforced(): bool {
* @return bool
*/
public function getCallsStartWithoutMedia(?string $userId): bool {
if ($userId !== null && $this->config->getUserValue($userId, 'spreed', UserPreference::CALLS_START_WITHOUT_MEDIA) === 'no') {
return false;
if ($userId !== null) {
$userSetting = $this->config->getUserValue($userId, 'spreed', UserPreference::CALLS_START_WITHOUT_MEDIA);
if ($userSetting === 'yes' || $userSetting === 'no') {
return $userSetting === 'yes';
}
}

return $this->appConfig->getAppValueBool('calls_start_without_media');
Expand Down

0 comments on commit 0458d0d

Please sign in to comment.