mirror of
https://github.com/nextcloud/spreed.git
synced 2025-12-18 05:20:50 +01:00
fix(conversation): Add more object types
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
5fdde80a21
commit
8afbbaac38
5 changed files with 29 additions and 8 deletions
|
|
@ -109,7 +109,13 @@ class FilesIntegrationController extends OCSController {
|
|||
} catch (RoomNotFoundException $e) {
|
||||
$name = $node->getName();
|
||||
$name = $this->roomService->prepareConversationName($name);
|
||||
$room = $this->roomService->createConversation(Room::TYPE_PUBLIC, $name, null, 'file', $fileId);
|
||||
$room = $this->roomService->createConversation(
|
||||
Room::TYPE_PUBLIC,
|
||||
$name,
|
||||
null,
|
||||
Room::OBJECT_TYPE_FILE,
|
||||
$fileId,
|
||||
);
|
||||
}
|
||||
|
||||
return new DataResponse([
|
||||
|
|
@ -184,7 +190,13 @@ class FilesIntegrationController extends OCSController {
|
|||
} catch (RoomNotFoundException) {
|
||||
$name = $share->getNode()->getName();
|
||||
$name = $this->roomService->prepareConversationName($name);
|
||||
$room = $this->roomService->createConversation(Room::TYPE_PUBLIC, $name, null, 'file', $fileId);
|
||||
$room = $this->roomService->createConversation(
|
||||
Room::TYPE_PUBLIC,
|
||||
$name,
|
||||
null,
|
||||
Room::OBJECT_TYPE_FILE,
|
||||
$fileId,
|
||||
);
|
||||
}
|
||||
} catch (NotFoundException) {
|
||||
return new DataResponse(null, Http::STATUS_NOT_FOUND);
|
||||
|
|
|
|||
|
|
@ -81,7 +81,13 @@ class PublicShareAuthController extends OCSController {
|
|||
$roomName = $this->roomService->prepareConversationName($roomName);
|
||||
|
||||
// Create the room
|
||||
$room = $this->roomService->createConversation(Room::TYPE_PUBLIC, $roomName, $sharerUser, 'share:password', $shareToken);
|
||||
$room = $this->roomService->createConversation(
|
||||
Room::TYPE_PUBLIC,
|
||||
$roomName,
|
||||
$sharerUser,
|
||||
Room::OBJECT_TYPE_VIDEO_VERIFICATION,
|
||||
$shareToken,
|
||||
);
|
||||
|
||||
$user = $this->userSession->getUser();
|
||||
$userId = $user instanceof IUser ? $user->getUID() : '';
|
||||
|
|
|
|||
|
|
@ -40,11 +40,12 @@ class Room {
|
|||
public const TYPE_NOTE_TO_SELF = 6;
|
||||
|
||||
public const OBJECT_TYPE_EMAIL = 'emails';
|
||||
public const OBJECT_TYPE_FILE = 'file';
|
||||
public const OBJECT_TYPE_PHONE = 'phone';
|
||||
public const OBJECT_TYPE_VIDEO_VERIFICATION = 'share:password';
|
||||
public const OBJECT_TYPE_SAMPLE = 'sample';
|
||||
public const OBJECT_TYPE_EVENT = 'event';
|
||||
public const OBJECT_TYPE_FILE = 'file';
|
||||
public const OBJECT_TYPE_NOTE_TO_SELF = 'note_to_self';
|
||||
public const OBJECT_TYPE_PHONE = 'phone';
|
||||
public const OBJECT_TYPE_SAMPLE = 'sample';
|
||||
public const OBJECT_TYPE_VIDEO_VERIFICATION = 'share:password';
|
||||
|
||||
public const RECORDING_NONE = 0;
|
||||
public const RECORDING_VIDEO = 1;
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ class NoteToSelfService {
|
|||
Room::TYPE_NOTE_TO_SELF,
|
||||
$this->l->t('Note to self'),
|
||||
$user,
|
||||
'note_to_self',
|
||||
Room::OBJECT_TYPE_NOTE_TO_SELF,
|
||||
$user->getUID()
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -190,8 +190,10 @@ class RoomService {
|
|||
Room::OBJECT_TYPE_EVENT,
|
||||
];
|
||||
if ($allowInternalTypes) {
|
||||
$objectTypes[] = BreakoutRoom::PARENT_OBJECT_TYPE;
|
||||
$objectTypes[] = Room::OBJECT_TYPE_EMAIL;
|
||||
$objectTypes[] = Room::OBJECT_TYPE_FILE;
|
||||
$objectTypes[] = Room::OBJECT_TYPE_NOTE_TO_SELF;
|
||||
$objectTypes[] = Room::OBJECT_TYPE_SAMPLE;
|
||||
$objectTypes[] = Room::OBJECT_TYPE_VIDEO_VERIFICATION;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue