зеркало из https://github.com/nextcloud/spreed.git
Initial state service is deprecated
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Родитель
2284b0797e
Коммит
91cad65d0e
|
@ -43,11 +43,11 @@ use OCP\AppFramework\Http\RedirectResponse;
|
|||
use OCP\AppFramework\Http\Response;
|
||||
use OCP\AppFramework\Http\TemplateResponse;
|
||||
use OCP\AppFramework\Http\Template\PublicTemplateResponse;
|
||||
use OCP\AppFramework\Services\IInitialState;
|
||||
use OCP\EventDispatcher\IEventDispatcher;
|
||||
use OCP\Files\IRootFolder;
|
||||
use OCP\ICacheFactory;
|
||||
use OCP\IConfig;
|
||||
use OCP\IInitialStateService;
|
||||
use OCP\IRequest;
|
||||
use OCP\IURLGenerator;
|
||||
use OCP\IUser;
|
||||
|
@ -93,7 +93,7 @@ class PageController extends Controller {
|
|||
IURLGenerator $url,
|
||||
INotificationManager $notificationManager,
|
||||
IAppManager $appManager,
|
||||
IInitialStateService $initialStateService,
|
||||
IInitialState $initialState,
|
||||
ICacheFactory $memcacheFactory,
|
||||
IRootFolder $rootFolder,
|
||||
Config $talkConfig,
|
||||
|
@ -109,7 +109,7 @@ class PageController extends Controller {
|
|||
$this->url = $url;
|
||||
$this->notificationManager = $notificationManager;
|
||||
$this->appManager = $appManager;
|
||||
$this->initialStateService = $initialStateService;
|
||||
$this->initialState = $initialState;
|
||||
$this->memcacheFactory = $memcacheFactory;
|
||||
$this->rootFolder = $rootFolder;
|
||||
$this->talkConfig = $talkConfig;
|
||||
|
|
|
@ -29,13 +29,13 @@ use OCA\Talk\AppInfo\Application;
|
|||
use OCA\Talk\Config;
|
||||
use OCA\Talk\TInitialState;
|
||||
use OCP\App\IAppManager;
|
||||
use OCP\AppFramework\Services\IInitialState;
|
||||
use OCP\EventDispatcher\Event;
|
||||
use OCP\EventDispatcher\IEventDispatcher;
|
||||
use OCP\EventDispatcher\IEventListener;
|
||||
use OCP\Files\IRootFolder;
|
||||
use OCP\ICacheFactory;
|
||||
use OCP\IConfig;
|
||||
use OCP\IInitialStateService;
|
||||
use OCP\IUser;
|
||||
use OCP\IUserSession;
|
||||
use OCP\Util;
|
||||
|
@ -53,14 +53,14 @@ class TemplateLoader implements IEventListener {
|
|||
/** @var IUserSession */
|
||||
private $userSession;
|
||||
|
||||
public function __construct(IInitialStateService $initialStateService,
|
||||
public function __construct(IInitialState $initialState,
|
||||
ICacheFactory $memcacheFactory,
|
||||
Config $talkConfig,
|
||||
IConfig $serverConfig,
|
||||
IAppManager $appManager,
|
||||
IRootFolder $rootFolder,
|
||||
IUserSession $userSession) {
|
||||
$this->initialStateService = $initialStateService;
|
||||
$this->initialState = $initialState;
|
||||
$this->memcacheFactory = $memcacheFactory;
|
||||
$this->talkConfig = $talkConfig;
|
||||
$this->serverConfig = $serverConfig;
|
||||
|
|
|
@ -28,12 +28,12 @@ namespace OCA\Talk\PublicShare;
|
|||
use OCA\Files_Sharing\Event\BeforeTemplateRenderedEvent;
|
||||
use OCA\Talk\Config;
|
||||
use OCA\Talk\TInitialState;
|
||||
use OCP\AppFramework\Services\IInitialState;
|
||||
use OCP\EventDispatcher\Event;
|
||||
use OCP\EventDispatcher\IEventListener;
|
||||
use OCP\Files\FileInfo;
|
||||
use OCP\ICacheFactory;
|
||||
use OCP\IConfig;
|
||||
use OCP\IInitialStateService;
|
||||
use OCP\Util;
|
||||
|
||||
/**
|
||||
|
@ -44,11 +44,11 @@ use OCP\Util;
|
|||
class TemplateLoader implements IEventListener {
|
||||
use TInitialState;
|
||||
|
||||
public function __construct(IInitialStateService $initialStateService,
|
||||
public function __construct(IInitialState $initialState,
|
||||
ICacheFactory $memcacheFactory,
|
||||
Config $talkConfig,
|
||||
IConfig $serverConfig) {
|
||||
$this->initialStateService = $initialStateService;
|
||||
$this->initialState = $initialState;
|
||||
$this->talkConfig = $talkConfig;
|
||||
$this->memcacheFactory = $memcacheFactory;
|
||||
$this->serverConfig = $serverConfig;
|
||||
|
|
|
@ -28,11 +28,11 @@ namespace OCA\Talk\PublicShareAuth;
|
|||
use OCA\Files_Sharing\Event\BeforeTemplateRenderedEvent;
|
||||
use OCA\Talk\Config;
|
||||
use OCA\Talk\TInitialState;
|
||||
use OCP\AppFramework\Services\IInitialState;
|
||||
use OCP\EventDispatcher\Event;
|
||||
use OCP\EventDispatcher\IEventListener;
|
||||
use OCP\ICacheFactory;
|
||||
use OCP\IConfig;
|
||||
use OCP\IInitialStateService;
|
||||
use OCP\Util;
|
||||
|
||||
/**
|
||||
|
@ -43,11 +43,11 @@ use OCP\Util;
|
|||
class TemplateLoader implements IEventListener {
|
||||
use TInitialState;
|
||||
|
||||
public function __construct(IInitialStateService $initialStateService,
|
||||
public function __construct(IInitialState $initialState,
|
||||
ICacheFactory $memcacheFactory,
|
||||
Config $talkConfig,
|
||||
IConfig $serverConfig) {
|
||||
$this->initialStateService = $initialStateService;
|
||||
$this->initialState = $initialState;
|
||||
$this->talkConfig = $talkConfig;
|
||||
$this->memcacheFactory = $memcacheFactory;
|
||||
$this->serverConfig = $serverConfig;
|
||||
|
|
|
@ -31,11 +31,11 @@ use OCA\Talk\Room;
|
|||
use OCA\Talk\Service\CommandService;
|
||||
use OCA\Talk\Exceptions\WrongPermissionsException;
|
||||
use OCP\AppFramework\Http\TemplateResponse;
|
||||
use OCP\AppFramework\Services\IInitialState;
|
||||
use OCP\ICacheFactory;
|
||||
use OCP\IConfig;
|
||||
use OCP\IGroup;
|
||||
use OCP\IGroupManager;
|
||||
use OCP\IInitialStateService;
|
||||
use OCP\IL10N;
|
||||
use OCP\IUser;
|
||||
use OCP\IUserSession;
|
||||
|
@ -50,8 +50,8 @@ class AdminSettings implements ISettings {
|
|||
private $serverConfig;
|
||||
/** @var CommandService */
|
||||
private $commandService;
|
||||
/** @var IInitialStateService */
|
||||
private $initialStateService;
|
||||
/** @var IInitialState */
|
||||
private $initialState;
|
||||
/** @var ICacheFactory */
|
||||
private $memcacheFactory;
|
||||
/** @var IGroupManager */
|
||||
|
@ -68,7 +68,7 @@ class AdminSettings implements ISettings {
|
|||
public function __construct(Config $talkConfig,
|
||||
IConfig $serverConfig,
|
||||
CommandService $commandService,
|
||||
IInitialStateService $initialStateService,
|
||||
IInitialState $initialState,
|
||||
ICacheFactory $memcacheFactory,
|
||||
IGroupManager $groupManager,
|
||||
MatterbridgeManager $bridgeManager,
|
||||
|
@ -78,7 +78,7 @@ class AdminSettings implements ISettings {
|
|||
$this->talkConfig = $talkConfig;
|
||||
$this->serverConfig = $serverConfig;
|
||||
$this->commandService = $commandService;
|
||||
$this->initialStateService = $initialStateService;
|
||||
$this->initialState = $initialState;
|
||||
$this->memcacheFactory = $memcacheFactory;
|
||||
$this->groupManager = $groupManager;
|
||||
$this->bridgeManager = $bridgeManager;
|
||||
|
@ -105,19 +105,19 @@ class AdminSettings implements ISettings {
|
|||
}
|
||||
|
||||
protected function initGeneralSettings(): void {
|
||||
$this->initialStateService->provideInitialState('talk', 'default_group_notification', (int) $this->serverConfig->getAppValue('spreed', 'default_group_notification', Participant::NOTIFY_MENTION));
|
||||
$this->initialStateService->provideInitialState('talk', 'conversations_files', (int) $this->serverConfig->getAppValue('spreed', 'conversations_files', '1'));
|
||||
$this->initialStateService->provideInitialState('talk', 'conversations_files_public_shares', (int) $this->serverConfig->getAppValue('spreed', 'conversations_files_public_shares', '1'));
|
||||
$this->initialState->provideInitialState('default_group_notification', (int) $this->serverConfig->getAppValue('spreed', 'default_group_notification', Participant::NOTIFY_MENTION));
|
||||
$this->initialState->provideInitialState('conversations_files', (int) $this->serverConfig->getAppValue('spreed', 'conversations_files', '1'));
|
||||
$this->initialState->provideInitialState('conversations_files_public_shares', (int) $this->serverConfig->getAppValue('spreed', 'conversations_files_public_shares', '1'));
|
||||
}
|
||||
|
||||
protected function initAllowedGroups(): void {
|
||||
$this->initialStateService->provideInitialState('talk', 'start_calls', (int) $this->serverConfig->getAppValue('spreed', 'start_calls', Room::START_CALL_EVERYONE));
|
||||
$this->initialState->provideInitialState('start_calls', (int) $this->serverConfig->getAppValue('spreed', 'start_calls', Room::START_CALL_EVERYONE));
|
||||
|
||||
$groups = $this->getGroupDetailsArray($this->talkConfig->getAllowedConversationsGroupIds());
|
||||
$this->initialStateService->provideInitialState('talk', 'start_conversations', $groups);
|
||||
$this->initialState->provideInitialState('start_conversations', $groups);
|
||||
|
||||
$groups = $this->getGroupDetailsArray($this->talkConfig->getAllowedTalkGroupIds());
|
||||
$this->initialStateService->provideInitialState('talk', 'allowed_groups', $groups);
|
||||
$this->initialState->provideInitialState('allowed_groups', $groups);
|
||||
}
|
||||
|
||||
protected function initCommands(): void {
|
||||
|
@ -127,7 +127,7 @@ class AdminSettings implements ISettings {
|
|||
return $command->asArray();
|
||||
}, $commands);
|
||||
|
||||
$this->initialStateService->provideInitialState('talk', 'commands', $result);
|
||||
$this->initialState->provideInitialState('commands', $result);
|
||||
}
|
||||
|
||||
protected function initMatterbridge(): void {
|
||||
|
@ -141,32 +141,32 @@ class AdminSettings implements ISettings {
|
|||
$version = '';
|
||||
$error = 'binary_permissions';
|
||||
}
|
||||
$this->initialStateService->provideInitialState(
|
||||
'talk', 'matterbridge_error', $error
|
||||
$this->initialState->provideInitialState(
|
||||
'matterbridge_error', $error
|
||||
);
|
||||
$this->initialStateService->provideInitialState(
|
||||
'talk', 'matterbridge_version', $version
|
||||
$this->initialState->provideInitialState(
|
||||
'matterbridge_version', $version
|
||||
);
|
||||
|
||||
$this->initialStateService->provideInitialState(
|
||||
'talk', 'matterbridge_enable',
|
||||
$this->initialState->provideInitialState(
|
||||
'matterbridge_enable',
|
||||
$this->serverConfig->getAppValue('spreed', 'enable_matterbridge', '0') === '1'
|
||||
);
|
||||
}
|
||||
|
||||
protected function initStunServers(): void {
|
||||
$this->initialStateService->provideInitialState('talk', 'stun_servers', $this->talkConfig->getStunServers());
|
||||
$this->initialStateService->provideInitialState('talk', 'has_internet_connection', $this->serverConfig->getSystemValueBool('has_internet_connection', true));
|
||||
$this->initialState->provideInitialState('stun_servers', $this->talkConfig->getStunServers());
|
||||
$this->initialState->provideInitialState('has_internet_connection', $this->serverConfig->getSystemValueBool('has_internet_connection', true));
|
||||
}
|
||||
|
||||
protected function initTurnServers(): void {
|
||||
$this->initialStateService->provideInitialState('talk', 'turn_servers', $this->talkConfig->getTurnServers());
|
||||
$this->initialState->provideInitialState('turn_servers', $this->talkConfig->getTurnServers());
|
||||
}
|
||||
|
||||
protected function initSignalingServers(): void {
|
||||
$this->initialStateService->provideInitialState('talk', 'has_cache_configured', $this->memcacheFactory->isAvailable());
|
||||
$this->initialStateService->provideInitialState('talk', 'signaling_mode', $this->talkConfig->getSignalingMode(false));
|
||||
$this->initialStateService->provideInitialState('talk', 'signaling_servers', [
|
||||
$this->initialState->provideInitialState('has_cache_configured', $this->memcacheFactory->isAvailable());
|
||||
$this->initialState->provideInitialState('signaling_mode', $this->talkConfig->getSignalingMode(false));
|
||||
$this->initialState->provideInitialState('signaling_servers', [
|
||||
'servers' => $this->talkConfig->getSignalingServers(),
|
||||
'secret' => $this->talkConfig->getSignalingSecret(),
|
||||
'hideWarning' => $this->talkConfig->getHideSignalingWarning(),
|
||||
|
@ -446,14 +446,14 @@ class AdminSettings implements ISettings {
|
|||
}
|
||||
}
|
||||
|
||||
$this->initialStateService->provideInitialState('talk', 'hosted_signaling_server_prefill', [
|
||||
$this->initialState->provideInitialState('hosted_signaling_server_prefill', [
|
||||
'url' => $this->serverConfig->getSystemValueString('overwrite.cli.url'),
|
||||
'fullName' => $this->currentUser->getDisplayName(),
|
||||
'email' => $this->currentUser->getEMailAddress() ?: '',
|
||||
'language' => $userLanguage,
|
||||
'country' => $guessCountry,
|
||||
]);
|
||||
$this->initialStateService->provideInitialState('talk', 'hosted_signaling_server_trial_data',
|
||||
$this->initialState->provideInitialState('hosted_signaling_server_trial_data',
|
||||
json_decode($this->serverConfig->getAppValue('spreed', 'hosted-signaling-server-account', "[]"), true) ?? []
|
||||
);
|
||||
$languages = $this->l10nFactory->getLanguages();
|
||||
|
@ -472,7 +472,7 @@ class AdminSettings implements ISettings {
|
|||
usort($countries, function ($a, $b) {
|
||||
return strcmp($a['name'], $b['name']);
|
||||
});
|
||||
$this->initialStateService->provideInitialState('talk', 'hosted_signaling_server_language_data', [
|
||||
$this->initialState->provideInitialState('hosted_signaling_server_language_data', [
|
||||
'languages' => $languages,
|
||||
'countries' => $countries,
|
||||
]);
|
||||
|
@ -481,9 +481,9 @@ class AdminSettings implements ISettings {
|
|||
protected function initSIPBridge(): void {
|
||||
$groups = $this->getGroupDetailsArray($this->talkConfig->getSIPGroups());
|
||||
|
||||
$this->initialStateService->provideInitialState('talk', 'sip_bridge_groups', $groups);
|
||||
$this->initialStateService->provideInitialState('talk', 'sip_bridge_shared_secret', $this->talkConfig->getSIPSharedSecret());
|
||||
$this->initialStateService->provideInitialState('talk', 'sip_bridge_dialin_info', $this->talkConfig->getDialInInfo());
|
||||
$this->initialState->provideInitialState('sip_bridge_groups', $groups);
|
||||
$this->initialState->provideInitialState('sip_bridge_shared_secret', $this->talkConfig->getSIPSharedSecret());
|
||||
$this->initialState->provideInitialState('sip_bridge_dialin_info', $this->talkConfig->getDialInInfo());
|
||||
}
|
||||
|
||||
protected function getGroupDetailsArray(array $gids): array {
|
||||
|
|
|
@ -26,11 +26,11 @@ namespace OCA\Talk;
|
|||
use OC\HintException;
|
||||
use OC\User\NoUserException;
|
||||
use OCP\App\IAppManager;
|
||||
use OCP\AppFramework\Services\IInitialState;
|
||||
use OCP\Files\IRootFolder;
|
||||
use OCP\Files\NotPermittedException;
|
||||
use OCP\ICacheFactory;
|
||||
use OCP\IConfig;
|
||||
use OCP\IInitialStateService;
|
||||
use OCP\IUser;
|
||||
use OCP\Util;
|
||||
|
||||
|
@ -40,8 +40,8 @@ trait TInitialState {
|
|||
protected $talkConfig;
|
||||
/** @var IConfig */
|
||||
protected $serverConfig;
|
||||
/** @var IInitialStateService */
|
||||
protected $initialStateService;
|
||||
/** @var IInitialState */
|
||||
protected $initialState;
|
||||
/** @var ICacheFactory */
|
||||
protected $memcacheFactory;
|
||||
|
||||
|
@ -49,8 +49,8 @@ trait TInitialState {
|
|||
// Needed to enable the screensharing extension in Chromium < 72.
|
||||
Util::addHeader('meta', ['id' => 'app', 'class' => 'nc-enable-screensharing-extension']);
|
||||
|
||||
$this->initialStateService->provideInitialState(
|
||||
'talk', 'prefer_h264',
|
||||
$this->initialState->provideInitialState(
|
||||
'prefer_h264',
|
||||
$this->serverConfig->getAppValue('spreed', 'prefer_h264', 'no') === 'yes'
|
||||
);
|
||||
|
||||
|
@ -63,13 +63,13 @@ trait TInitialState {
|
|||
);
|
||||
}
|
||||
|
||||
$this->initialStateService->provideInitialState(
|
||||
'talk', 'signaling_mode',
|
||||
$this->initialState->provideInitialState(
|
||||
'signaling_mode',
|
||||
$this->talkConfig->getSignalingMode()
|
||||
);
|
||||
|
||||
$this->initialStateService->provideInitialState(
|
||||
'talk', 'sip_dialin_info',
|
||||
$this->initialState->provideInitialState(
|
||||
'sip_dialin_info',
|
||||
$this->talkConfig->getDialInInfo()
|
||||
);
|
||||
}
|
||||
|
@ -77,23 +77,23 @@ trait TInitialState {
|
|||
protected function publishInitialStateForUser(IUser $user, IRootFolder $rootFolder, IAppManager $appManager): void {
|
||||
$this->publishInitialStateShared();
|
||||
|
||||
$this->initialStateService->provideInitialState(
|
||||
'talk', 'start_conversations',
|
||||
$this->initialState->provideInitialState(
|
||||
'start_conversations',
|
||||
!$this->talkConfig->isNotAllowedToCreateConversations($user)
|
||||
);
|
||||
|
||||
$this->initialStateService->provideInitialState(
|
||||
'talk', 'circles_enabled',
|
||||
$this->initialState->provideInitialState(
|
||||
'circles_enabled',
|
||||
$appManager->isEnabledForUser('circles', $user)
|
||||
);
|
||||
|
||||
$this->initialStateService->provideInitialState(
|
||||
'talk', 'guests_accounts_enabled',
|
||||
$this->initialState->provideInitialState(
|
||||
'guests_accounts_enabled',
|
||||
$appManager->isEnabledForUser('guests', $user)
|
||||
);
|
||||
|
||||
$this->initialStateService->provideInitialState(
|
||||
'talk', 'read_status_privacy',
|
||||
$this->initialState->provideInitialState(
|
||||
'read_status_privacy',
|
||||
$this->talkConfig->getUserReadPrivacy($user->getUID())
|
||||
);
|
||||
|
||||
|
@ -113,13 +113,13 @@ trait TInitialState {
|
|||
}
|
||||
}
|
||||
|
||||
$this->initialStateService->provideInitialState(
|
||||
'talk', 'attachment_folder',
|
||||
$this->initialState->provideInitialState(
|
||||
'attachment_folder',
|
||||
$attachmentFolder
|
||||
);
|
||||
|
||||
$this->initialStateService->provideInitialState(
|
||||
'talk', 'enable_matterbridge',
|
||||
$this->initialState->provideInitialState(
|
||||
'enable_matterbridge',
|
||||
$this->serverConfig->getAppValue('spreed', 'enable_matterbridge', '0') === '1'
|
||||
);
|
||||
}
|
||||
|
@ -127,28 +127,28 @@ trait TInitialState {
|
|||
protected function publishInitialStateForGuest(): void {
|
||||
$this->publishInitialStateShared();
|
||||
|
||||
$this->initialStateService->provideInitialState(
|
||||
'talk', 'start_conversations',
|
||||
$this->initialState->provideInitialState(
|
||||
'start_conversations',
|
||||
false
|
||||
);
|
||||
|
||||
$this->initialStateService->provideInitialState(
|
||||
'talk', 'circles_enabled',
|
||||
$this->initialState->provideInitialState(
|
||||
'circles_enabled',
|
||||
false
|
||||
);
|
||||
|
||||
$this->initialStateService->provideInitialState(
|
||||
'talk', 'read_status_privacy',
|
||||
$this->initialState->provideInitialState(
|
||||
'read_status_privacy',
|
||||
Participant::PRIVACY_PUBLIC
|
||||
);
|
||||
|
||||
$this->initialStateService->provideInitialState(
|
||||
'talk', 'attachment_folder',
|
||||
$this->initialState->provideInitialState(
|
||||
'attachment_folder',
|
||||
''
|
||||
);
|
||||
|
||||
$this->initialStateService->provideInitialState(
|
||||
'talk', 'enable_matterbridge',
|
||||
$this->initialState->provideInitialState(
|
||||
'enable_matterbridge',
|
||||
false
|
||||
);
|
||||
}
|
||||
|
|
|
@ -197,7 +197,7 @@ export default {
|
|||
// used), although that should not be a problem given that only the
|
||||
// "inCall" flag (which is locally updated when joining and leaving
|
||||
// a call) is currently used.
|
||||
if (loadState('talk', 'signaling_mode') !== 'internal') {
|
||||
if (loadState('spreed', 'signaling_mode') !== 'internal') {
|
||||
EventBus.$on('shouldRefreshConversations', OCA.Talk.fetchCurrentConversationWrapper)
|
||||
EventBus.$on('Signaling::participantListChanged', OCA.Talk.fetchCurrentConversationWrapper)
|
||||
} else {
|
||||
|
|
|
@ -139,7 +139,7 @@ export default {
|
|||
// used), although that should not be a problem given that only the
|
||||
// "inCall" flag (which is locally updated when joining and leaving
|
||||
// a call) is currently used.
|
||||
if (loadState('talk', 'signaling_mode') !== 'internal') {
|
||||
if (loadState('spreed', 'signaling_mode') !== 'internal') {
|
||||
EventBus.$on('shouldRefreshConversations', this.fetchCurrentConversation)
|
||||
EventBus.$on('Signaling::participantListChanged', this.fetchCurrentConversation)
|
||||
} else {
|
||||
|
|
|
@ -156,7 +156,7 @@ export default {
|
|||
// used), although that should not be a problem given that only the
|
||||
// "inCall" flag (which is locally updated when joining and leaving
|
||||
// a call) is currently used.
|
||||
if (loadState('talk', 'signaling_mode') !== 'internal') {
|
||||
if (loadState('spreed', 'signaling_mode') !== 'internal') {
|
||||
EventBus.$on('shouldRefreshConversations', this.fetchCurrentConversation)
|
||||
EventBus.$on('Signaling::participantListChanged', this.fetchCurrentConversation)
|
||||
} else {
|
||||
|
|
|
@ -135,13 +135,13 @@ export default {
|
|||
|
||||
mounted() {
|
||||
this.loading = true
|
||||
this.allowedGroups = loadState('talk', 'allowed_groups').sort(function(a, b) {
|
||||
this.allowedGroups = loadState('spreed', 'allowed_groups').sort(function(a, b) {
|
||||
return a.displayname.localeCompare(b.displayname)
|
||||
})
|
||||
this.canStartConversations = loadState('talk', 'start_conversations').sort(function(a, b) {
|
||||
this.canStartConversations = loadState('spreed', 'start_conversations').sort(function(a, b) {
|
||||
return a.displayname.localeCompare(b.displayname)
|
||||
})
|
||||
this.startCalls = startCallOptions[parseInt(loadState('talk', 'start_calls'))]
|
||||
this.startCalls = startCallOptions[parseInt(loadState('spreed', 'start_calls'))]
|
||||
|
||||
// Make a unique list with the groups we know from allowedGroups and canStartConversations
|
||||
// Unique checking is done by turning the group objects (with id and name)
|
||||
|
|
|
@ -79,7 +79,7 @@ export default {
|
|||
},
|
||||
|
||||
mounted() {
|
||||
this.commands = loadState('talk', 'commands')
|
||||
this.commands = loadState('spreed', 'commands')
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -96,9 +96,9 @@ export default {
|
|||
|
||||
mounted() {
|
||||
this.loading = true
|
||||
this.conversationsFiles = parseInt(loadState('talk', 'conversations_files')) === 1
|
||||
this.defaultGroupNotification = defaultGroupNotificationOptions[parseInt(loadState('talk', 'default_group_notification')) - 1]
|
||||
this.conversationsFilesPublicShares = parseInt(loadState('talk', 'conversations_files_public_shares')) === 1
|
||||
this.conversationsFiles = parseInt(loadState('spreed', 'conversations_files')) === 1
|
||||
this.defaultGroupNotification = defaultGroupNotificationOptions[parseInt(loadState('spreed', 'default_group_notification')) - 1]
|
||||
this.conversationsFilesPublicShares = parseInt(loadState('spreed', 'conversations_files_public_shares')) === 1
|
||||
this.loading = false
|
||||
},
|
||||
|
||||
|
|
|
@ -195,20 +195,20 @@ export default {
|
|||
},
|
||||
|
||||
beforeMount() {
|
||||
const state = loadState('talk', 'hosted_signaling_server_prefill')
|
||||
const state = loadState('spreed', 'hosted_signaling_server_prefill')
|
||||
this.hostedHPBNextcloudUrl = state.url
|
||||
this.hostedHPBFullName = state.fullName
|
||||
this.hostedHPBEmail = state.email
|
||||
this.hostedHPBLanguage = state.language
|
||||
this.hostedHPBCountry = state.country
|
||||
|
||||
this.trialAccount = loadState('talk', 'hosted_signaling_server_trial_data')
|
||||
this.trialAccount = loadState('spreed', 'hosted_signaling_server_trial_data')
|
||||
|
||||
const languagesAndCountries = loadState('talk', 'hosted_signaling_server_language_data')
|
||||
const languagesAndCountries = loadState('spreed', 'hosted_signaling_server_language_data')
|
||||
this.languages = languagesAndCountries['languages'] // two lists of {code: "es", name: "Español"} - one is in 'commonlanguages' and one in 'languages'
|
||||
this.countries = languagesAndCountries['countries'] // list of {code: "France", name: "France"}
|
||||
|
||||
const signaling = loadState('talk', 'signaling_servers')
|
||||
const signaling = loadState('spreed', 'signaling_servers')
|
||||
this.showForm = this.trialAccount.length !== 0
|
||||
|| signaling.servers.length === 0
|
||||
},
|
||||
|
|
|
@ -85,10 +85,10 @@ export default {
|
|||
|
||||
data() {
|
||||
return {
|
||||
matterbridgeEnabled: loadState('talk', 'matterbridge_enable'),
|
||||
matterbridgeVersion: loadState('talk', 'matterbridge_version'),
|
||||
matterbridgeEnabled: loadState('spreed', 'matterbridge_enable'),
|
||||
matterbridgeVersion: loadState('spreed', 'matterbridge_version'),
|
||||
isInstalling: false,
|
||||
error: loadState('talk', 'matterbridge_error'),
|
||||
error: loadState('spreed', 'matterbridge_error'),
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -109,12 +109,12 @@ export default {
|
|||
|
||||
mounted() {
|
||||
this.loading = true
|
||||
this.groups = loadState('talk', 'sip_bridge_groups').sort(function(a, b) {
|
||||
this.groups = loadState('spreed', 'sip_bridge_groups').sort(function(a, b) {
|
||||
return a.displayname.localeCompare(b.displayname)
|
||||
})
|
||||
this.sipGroups = this.groups
|
||||
this.dialInInfo = loadState('talk', 'sip_bridge_dialin_info')
|
||||
this.sharedSecret = loadState('talk', 'sip_bridge_shared_secret')
|
||||
this.dialInInfo = loadState('spreed', 'sip_bridge_dialin_info')
|
||||
this.sharedSecret = loadState('spreed', 'sip_bridge_shared_secret')
|
||||
this.searchGroup('')
|
||||
this.loading = false
|
||||
},
|
||||
|
|
|
@ -109,8 +109,8 @@ export default {
|
|||
hideWarning: false,
|
||||
loading: false,
|
||||
saved: false,
|
||||
isCacheConfigured: loadState('talk', 'has_cache_configured'),
|
||||
isClusteredMode: loadState('talk', 'signaling_mode') === SIGNALING.MODE.CLUSTER_CONVERSATION,
|
||||
isCacheConfigured: loadState('spreed', 'has_cache_configured'),
|
||||
isClusteredMode: loadState('spreed', 'signaling_mode') === SIGNALING.MODE.CLUSTER_CONVERSATION,
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -121,7 +121,7 @@ export default {
|
|||
},
|
||||
|
||||
beforeMount() {
|
||||
const state = loadState('talk', 'signaling_servers')
|
||||
const state = loadState('spreed', 'signaling_servers')
|
||||
this.servers = state.servers
|
||||
this.secret = state.secret
|
||||
this.hideWarning = state.hideWarning
|
||||
|
|
|
@ -80,8 +80,8 @@ export default {
|
|||
},
|
||||
|
||||
beforeMount() {
|
||||
this.servers = loadState('talk', 'stun_servers')
|
||||
this.hasInternetConnection = loadState('talk', 'has_internet_connection')
|
||||
this.servers = loadState('spreed', 'stun_servers')
|
||||
this.hasInternetConnection = loadState('spreed', 'has_internet_connection')
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
|
|
@ -89,7 +89,7 @@ export default {
|
|||
},
|
||||
|
||||
beforeMount() {
|
||||
this.servers = loadState('talk', 'turn_servers')
|
||||
this.servers = loadState('spreed', 'turn_servers')
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
|
|
@ -83,7 +83,7 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
showSettings: false,
|
||||
matterbridgeEnabled: loadState('talk', 'enable_matterbridge'),
|
||||
matterbridgeEnabled: loadState('spreed', 'enable_matterbridge'),
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -75,7 +75,7 @@ export default {
|
|||
listable: null,
|
||||
isListableLoading: false,
|
||||
lastNotification: null,
|
||||
isGuestsAccountsEnabled: loadState('talk', 'guests_accounts_enabled'),
|
||||
isGuestsAccountsEnabled: loadState('spreed', 'guests_accounts_enabled'),
|
||||
LISTABLE: CONVERSATION.LISTABLE,
|
||||
}
|
||||
},
|
||||
|
|
|
@ -165,8 +165,8 @@ export default {
|
|||
searchResultsListedConversations: [],
|
||||
contactsLoading: false,
|
||||
listedConversationsLoading: false,
|
||||
isCirclesEnabled: loadState('talk', 'circles_enabled'),
|
||||
canStartConversations: loadState('talk', 'start_conversations'),
|
||||
isCirclesEnabled: loadState('spreed', 'circles_enabled'),
|
||||
canStartConversations: loadState('spreed', 'start_conversations'),
|
||||
initialisedConversations: false,
|
||||
cancelSearchPossibleConversations: () => {},
|
||||
cancelSearchListedConversations: () => {},
|
||||
|
|
|
@ -94,7 +94,7 @@ export default {
|
|||
searchResults: [],
|
||||
contactsLoading: false,
|
||||
participantsInitialised: false,
|
||||
isCirclesEnabled: loadState('talk', 'circles_enabled'),
|
||||
isCirclesEnabled: loadState('spreed', 'circles_enabled'),
|
||||
/**
|
||||
* Stores the cancel function for cancelableGetParticipants
|
||||
*/
|
||||
|
|
|
@ -53,7 +53,7 @@ export default {
|
|||
|
||||
data() {
|
||||
return {
|
||||
dialInInfo: loadState('talk', 'sip_dialin_info'),
|
||||
dialInInfo: loadState('spreed', 'sip_dialin_info'),
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ import { EventBus } from '../services/EventBus'
|
|||
import { shareFile } from '../services/filesSharingServices'
|
||||
|
||||
const state = {
|
||||
attachmentFolder: loadState('talk', 'attachment_folder'),
|
||||
attachmentFolder: loadState('spreed', 'attachment_folder'),
|
||||
uploads: {
|
||||
},
|
||||
currentUploadId: undefined,
|
||||
|
|
|
@ -22,7 +22,7 @@ import { loadState } from '@nextcloud/initial-state'
|
|||
import { setReadStatusPrivacy } from '../services/settingsService'
|
||||
|
||||
const state = {
|
||||
readStatusPrivacy: loadState('talk', 'read_status_privacy'),
|
||||
readStatusPrivacy: loadState('spreed', 'read_status_privacy'),
|
||||
}
|
||||
|
||||
const getters = {
|
||||
|
|
|
@ -94,7 +94,7 @@ util.inherits(Peer, WildEmitter)
|
|||
|
||||
function shouldPreferH264() {
|
||||
try {
|
||||
return initialState.loadState('talk', 'prefer_h264')
|
||||
return initialState.loadState('spreed', 'prefer_h264')
|
||||
} catch (exception) {
|
||||
// If the state can not be loaded an exception is thrown
|
||||
console.warn('Could not find initial state for H.264 preference')
|
||||
|
|
|
@ -27,10 +27,10 @@ use OCA\Talk\Config;
|
|||
use OCA\Talk\MatterbridgeManager;
|
||||
use OCA\Talk\Service\CommandService;
|
||||
use OCA\Talk\Settings\Admin\AdminSettings;
|
||||
use OCP\AppFramework\Services\IInitialState;
|
||||
use OCP\ICacheFactory;
|
||||
use OCP\IConfig;
|
||||
use OCP\IGroupManager;
|
||||
use OCP\IInitialStateService;
|
||||
use OCP\IL10N;
|
||||
use OCP\IUserSession;
|
||||
use OCP\L10N\IFactory;
|
||||
|
@ -44,7 +44,7 @@ class AdminSettingsTest extends \Test\TestCase {
|
|||
protected $serverConfig;
|
||||
/** @var CommandService|MockObject */
|
||||
protected $commandService;
|
||||
/** @var IInitialStateService|MockObject */
|
||||
/** @var IInitialState|MockObject */
|
||||
protected $initialState;
|
||||
/** @var ICacheFactory|MockObject */
|
||||
protected $cacheFactory;
|
||||
|
@ -67,7 +67,7 @@ class AdminSettingsTest extends \Test\TestCase {
|
|||
$this->talkConfig = $this->createMock(Config::class);
|
||||
$this->serverConfig = $this->createMock(IConfig::class);
|
||||
$this->commandService = $this->createMock(CommandService::class);
|
||||
$this->initialState = $this->createMock(IInitialStateService::class);
|
||||
$this->initialState = $this->createMock(IInitialState::class);
|
||||
$this->cacheFactory = $this->createMock(ICacheFactory::class);
|
||||
$this->groupManager = $this->createMock(IGroupManager::class);
|
||||
$this->matterbridgeManager = $this->createMock(MatterbridgeManager::class);
|
||||
|
@ -169,8 +169,8 @@ class AdminSettingsTest extends \Test\TestCase {
|
|||
$this->initialState->expects($this->exactly(2))
|
||||
->method('provideInitialState')
|
||||
->withConsecutive(
|
||||
['talk', 'stun_servers', ['getStunServers']],
|
||||
['talk', 'has_internet_connection', true]
|
||||
['stun_servers', ['getStunServers']],
|
||||
['has_internet_connection', true]
|
||||
);
|
||||
|
||||
$admin = $this->getAdminSettings();
|
||||
|
@ -184,7 +184,7 @@ class AdminSettingsTest extends \Test\TestCase {
|
|||
|
||||
$this->initialState->expects($this->once())
|
||||
->method('provideInitialState')
|
||||
->with('talk', 'turn_servers', ['getTurnServers']);
|
||||
->with('turn_servers', ['getTurnServers']);
|
||||
|
||||
$admin = $this->getAdminSettings();
|
||||
self::invokePrivate($admin, 'initTurnServers');
|
||||
|
|
Загрузка…
Ссылка в новой задаче