Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add icon to resource objects
Signed-off-by: Julius Härtl <[email protected]>
  • Loading branch information
juliusknorr authored and nickvergessen committed Mar 27, 2019
commit c0bc066805d37ed233ccfacf8f19983eadaa5d48
7 changes: 6 additions & 1 deletion lib/Collaboration/Resources/ConversationProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,19 @@
use OCP\Collaboration\Resources\IProvider;
use OCP\Collaboration\Resources\IResource;
use OCP\Collaboration\Resources\ResourceException;
use OCP\IURLGenerator;
use OCP\IUser;

class ConversationProvider implements IProvider {

/** @var Manager */
protected $manager;
/** @var IURLGenerator */
protected $urlGenerator;

public function __construct(Manager $manager) {
public function __construct(Manager $manager, IURLGenerator $urlGenerator) {
$this->manager = $manager;
$this->urlGenerator = $urlGenerator;
}

public function getResourceRichObject(IResource $resource): array {
Expand All @@ -48,6 +52,7 @@ public function getResourceRichObject(IResource $resource): array {
'id' => $resource->getId(),
'name' => $room->getDisplayName(''),
'call-type' => $this->getRoomType($room),
'iconUrl' => $this->urlGenerator->imagePath('spreed', 'app-dark.svg')
];
} catch (RoomNotFoundException $e) {
throw new ResourceException('Conversation not found');
Expand Down