diff --git a/lib/Controller/PageController.php b/lib/Controller/PageController.php index 33b0f5a74dd..b3b3eb10e83 100644 --- a/lib/Controller/PageController.php +++ b/lib/Controller/PageController.php @@ -32,6 +32,7 @@ use OCA\Talk\Participant; use OCA\Talk\Room; use OCA\Talk\TalkSession; +use OCA\Viewer\Event\LoadViewer; use OCP\App\IAppManager; use OCP\AppFramework\Controller; use OCP\AppFramework\Http; @@ -40,6 +41,7 @@ use OCP\AppFramework\Http\Response; use OCP\AppFramework\Http\TemplateResponse; use OCP\AppFramework\Http\Template\PublicTemplateResponse; +use OCP\EventDispatcher\IEventDispatcher; use OCP\Files\IRootFolder; use OCP\Files\NotPermittedException; use OCP\IInitialStateService; @@ -53,6 +55,8 @@ class PageController extends Controller { /** @var string|null */ private $userId; + /** @var IEventDispatcher */ + private $eventDispatcher; /** @var RoomController */ private $api; /** @var TalkSession */ @@ -78,6 +82,7 @@ class PageController extends Controller { public function __construct(string $appName, IRequest $request, + IEventDispatcher $eventDispatcher, RoomController $api, TalkSession $session, IUserSession $userSession, @@ -91,6 +96,7 @@ public function __construct(string $appName, IRootFolder $rootFolder, Config $config) { parent::__construct($appName, $request); + $this->eventDispatcher = $eventDispatcher; $this->api = $api; $this->talkSession = $session; $this->userSession = $userSession; @@ -243,6 +249,10 @@ public function index(string $token = '', string $callUser = '', string $passwor } } + if (class_exists(LoadViewer::class)) { + $this->eventDispatcher->dispatchTyped(new LoadViewer()); + } + $params = [ 'token' => $token, 'signaling-settings' => $this->config->getSettings($this->userId), diff --git a/src/components/MessagesList/MessagesGroup/Message/MessagePart/FilePreview.vue b/src/components/MessagesList/MessagesGroup/Message/MessagePart/FilePreview.vue index ed8d13f7d7c..9a5a77968ea 100644 --- a/src/components/MessagesList/MessagesGroup/Message/MessagePart/FilePreview.vue +++ b/src/components/MessagesList/MessagesGroup/Message/MessagePart/FilePreview.vue @@ -22,8 +22,10 @@