diff options
author | Julius Härtl <jus@bitgrid.net> | 2021-11-29 21:17:49 +0300 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2021-12-29 20:10:29 +0300 |
commit | 197156bf38babb30f2fef0831cd383ab36d35197 (patch) | |
tree | 939803e0b3c192428ed975217b4e6691dca604ac /lib | |
parent | ccdc5df5100b4369ec51ecce466d9eca63475871 (diff) |
Expose guest avatar images through wopi
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Controller/WopiController.php | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Controller/WopiController.php b/lib/Controller/WopiController.php index 07bd8a38..e3013197 100644 --- a/lib/Controller/WopiController.php +++ b/lib/Controller/WopiController.php @@ -233,6 +233,8 @@ class WopiController extends Controller { $user = $this->userManager->get($wopi->getEditorUid()); if($user !== null) { $response['UserExtraInfo']['avatar'] = $this->urlGenerator->linkToRouteAbsolute('core.avatar.getAvatar', ['userId' => $wopi->getEditorUid(), 'size' => self::WOPI_AVATAR_SIZE]); + } else { + $response['UserExtraInfo']['avatar'] = $this->urlGenerator->linkToRouteAbsolute('core.GuestAvatar.getAvatar', ['guestName' => urlencode($wopi->getGuestDisplayname()), 'size' => self::WOPI_AVATAR_SIZE]); } if ($wopi->isRemoteToken()) { |