diff options
-rw-r--r-- | docs/constants.md | 11 | ||||
-rw-r--r-- | img/icon-conversation-phone-bright.svg | 6 | ||||
-rw-r--r-- | img/icon-conversation-phone-dark.svg | 6 | ||||
-rw-r--r-- | lib/Controller/RoomController.php | 5 | ||||
-rw-r--r-- | lib/Service/AvatarService.php | 3 |
5 files changed, 25 insertions, 6 deletions
diff --git a/docs/constants.md b/docs/constants.md index 3b1fe809d..f76085b3f 100644 --- a/docs/constants.md +++ b/docs/constants.md @@ -12,11 +12,12 @@ ### Object types -| Constant | Can be created | Description | Object ID | -|------------------|----------------|------------------------------------------------------------------|---------------------------------------| -| `file` | No | Conversations about a file in the right sidebar of the files app | File ID | -| `share:password` | No | Video verification to verify the identity of the share recipient | Share token | -| `room` | Yes | Room is a breakout room | Token of the main/parent conversation | +| Constant | Can be created | Description | Object ID | +|------------------|----------------|------------------------------------------------------------------|---------------------------------------------------------| +| `file` | No | Conversations about a file in the right sidebar of the files app | File ID | +| `share:password` | No | Video verification to verify the identity of the share recipient | Share token | +| `room` | Yes | Room is a breakout room | Token of the main/parent conversation | +| `phone` | Yes | Room is created when calling a phone number with SIP dial-out | `phone` (not set atm, just used for the default avatar) | ### Read-only states * `0` Read-write diff --git a/img/icon-conversation-phone-bright.svg b/img/icon-conversation-phone-bright.svg new file mode 100644 index 000000000..05e0a4e15 --- /dev/null +++ b/img/icon-conversation-phone-bright.svg @@ -0,0 +1,6 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" height="16" width="16" version="1.1"> + <circle r="16" cx="16" cy="16" fill="#DBDBDB"/> + <g transform="translate(8.000000, 8.000000)"> + <path fill="#fff" d="M4.41333 7.19333C5.37333 9.08 6.92 10.62 8.80667 11.5867L10.2733 10.12C10.4533 9.94 10.72 9.88 10.9533 9.96C11.7 10.2067 12.5067 10.34 13.3333 10.34C13.7 10.34 14 10.64 14 11.0067V13.3333C14 13.7 13.7 14 13.3333 14C7.07333 14 2 8.92667 2 2.66667C2 2.3 2.3 2 2.66667 2H5C5.36667 2 5.66667 2.3 5.66667 2.66667C5.66667 3.5 5.8 4.3 6.04667 5.04667C6.12 5.28 6.06667 5.54 5.88 5.72667L4.41333 7.19333Z"/> + </g> +</svg> diff --git a/img/icon-conversation-phone-dark.svg b/img/icon-conversation-phone-dark.svg new file mode 100644 index 000000000..2a10dbcc3 --- /dev/null +++ b/img/icon-conversation-phone-dark.svg @@ -0,0 +1,6 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" height="16" width="16" version="1.1"> + <circle r="16" cx="16" cy="16" fill="#3B3B3B"/> + <g transform="translate(8.000000, 8.000000)"> + <path fill="#fff" d="M4.41333 7.19333C5.37333 9.08 6.92 10.62 8.80667 11.5867L10.2733 10.12C10.4533 9.94 10.72 9.88 10.9533 9.96C11.7 10.2067 12.5067 10.34 13.3333 10.34C13.7 10.34 14 10.64 14 11.0067V13.3333C14 13.7 13.7 14 13.3333 14C7.07333 14 2 8.92667 2 2.66667C2 2.3 2.3 2 2.66667 2H5C5.36667 2 5.66667 2.3 5.66667 2.66667C5.66667 3.5 5.8 4.3 6.04667 5.04667C6.12 5.28 6.06667 5.54 5.88 5.72667L4.41333 7.19333Z"/> + </g> +</svg> diff --git a/lib/Controller/RoomController.php b/lib/Controller/RoomController.php index d42ec712c..edf5c7a5a 100644 --- a/lib/Controller/RoomController.php +++ b/lib/Controller/RoomController.php @@ -483,7 +483,7 @@ class RoomController extends AEnvironmentAwareController { } return $this->createGroupRoom($invite); case Room::TYPE_PUBLIC: - return $this->createEmptyRoom($roomName); + return $this->createEmptyRoom($roomName, true, $objectType, $objectId); } return new DataResponse([], Http::STATUS_BAD_REQUEST); @@ -627,6 +627,9 @@ class RoomController extends AEnvironmentAwareController { } catch (ParticipantNotFoundException $e) { return new DataResponse(['error' => 'permissions'], Http::STATUS_BAD_REQUEST); } + } elseif ($objectType === Room::OBJECT_TYPE_PHONE) { + // Ignoring any user input on this one + $objectId = $objectType; } elseif ($objectType !== '') { return new DataResponse(['error' => 'object'], Http::STATUS_BAD_REQUEST); } diff --git a/lib/Service/AvatarService.php b/lib/Service/AvatarService.php index d08e3fabf..579103144 100644 --- a/lib/Service/AvatarService.php +++ b/lib/Service/AvatarService.php @@ -301,6 +301,9 @@ class AvatarService { if ($room->getObjectType() === Room::OBJECT_TYPE_EMAIL) { return __DIR__ . '/../../img/icon-conversation-mail-' . $colorTone . '.svg'; } + if ($room->getObjectType() === Room::OBJECT_TYPE_PHONE) { + return __DIR__ . '/../../img/icon-conversation-phone-' . $colorTone . '.svg'; + } if ($room->getType() === Room::TYPE_PUBLIC) { return __DIR__ . '/../../img/icon-conversation-public-' . $colorTone . '.svg'; } |