Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/spreed.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib/Model
diff options
context:
space:
mode:
authorGary Kim <gary@garykim.dev>2021-07-14 06:45:54 +0300
committerGary Kim <gary@garykim.dev>2021-07-15 20:55:21 +0300
commitcf85ac6c9f8c90341cf9f35a20886d6c3a5db8fd (patch)
tree9912317776dc262d475cea979a8eb95c635f8b49 /lib/Model
parentc49a1c27544ab0a4014a2ff385285d2bb556e5e6 (diff)
Add remoteId
Signed-off-by: Gary Kim <gary@garykim.dev>
Diffstat (limited to 'lib/Model')
-rw-r--r--lib/Model/Attendee.php7
-rw-r--r--lib/Model/AttendeeMapper.php1
-rw-r--r--lib/Model/Invitation.php7
-rw-r--r--lib/Model/InvitationMapper.php7
4 files changed, 19 insertions, 3 deletions
diff --git a/lib/Model/Attendee.php b/lib/Model/Attendee.php
index 9d1ccb0f2..e0de04da1 100644
--- a/lib/Model/Attendee.php
+++ b/lib/Model/Attendee.php
@@ -53,6 +53,8 @@ use OCP\AppFramework\Db\Entity;
* @method int getPublishingPermissions()
* @method void setAccessToken(string $accessToken)
* @method null|string getAccessToken()
+ * @method void setRemoteId(string $remoteId)
+ * @method string getRemoteId()
*/
class Attendee extends Entity {
public const ACTOR_USERS = 'users';
@@ -111,6 +113,9 @@ class Attendee extends Entity {
/** @var string */
protected $accessToken;
+ /** @var string */
+ protected $remoteId;
+
public function __construct() {
$this->addType('roomId', 'int');
$this->addType('actorType', 'string');
@@ -126,6 +131,7 @@ class Attendee extends Entity {
$this->addType('readPrivacy', 'int');
$this->addType('publishingPermissions', 'int');
$this->addType('accessToken', 'string');
+ $this->addType('remote_id', 'string');
}
public function getDisplayName(): string {
@@ -152,6 +158,7 @@ class Attendee extends Entity {
'read_privacy' => $this->getReadPrivacy(),
'publishing_permissions' => $this->getPublishingPermissions(),
'access_token' => $this->getAccessToken(),
+ 'remote_id' => $this->getRemoteId(),
];
}
}
diff --git a/lib/Model/AttendeeMapper.php b/lib/Model/AttendeeMapper.php
index cbf6f0393..9a57c7887 100644
--- a/lib/Model/AttendeeMapper.php
+++ b/lib/Model/AttendeeMapper.php
@@ -175,6 +175,7 @@ class AttendeeMapper extends QBMapper {
'read_privacy' => (int) $row['read_privacy'],
'publishing_permissions' => (int) $row['publishing_permissions'],
'access_token' => (string) $row['access_token'],
+ 'remote_id' => (string) $row['remote_id'],
]);
}
}
diff --git a/lib/Model/Invitation.php b/lib/Model/Invitation.php
index cf2a591e0..8ba075615 100644
--- a/lib/Model/Invitation.php
+++ b/lib/Model/Invitation.php
@@ -38,6 +38,8 @@ use OCP\AppFramework\Db\Entity;
* @method string getUserId()
* @method void setAccessToken(string $accessToken)
* @method string getAccessToken()
+ * @method void setRemoteId(string $remoteId)
+ * @method string getRemoteId()
*/
class Invitation extends Entity {
/** @var int */
@@ -49,10 +51,14 @@ class Invitation extends Entity {
/** @var string */
protected $accessToken;
+ /** @var string */
+ protected $remoteId;
+
public function __construct() {
$this->addType('roomId', 'int');
$this->addType('userId', 'string');
$this->addType('accessToken', 'string');
+ $this->addType('remoteId', 'string');
}
public function asArray(): array {
@@ -61,6 +67,7 @@ class Invitation extends Entity {
'room_id' => $this->getRoomId(),
'user_id' => $this->getUserId(),
'access_token' => $this->getAccessToken(),
+ 'remote_id' => $this->getRemoteId(),
];
}
}
diff --git a/lib/Model/InvitationMapper.php b/lib/Model/InvitationMapper.php
index 2a453a2a0..f54cbafd8 100644
--- a/lib/Model/InvitationMapper.php
+++ b/lib/Model/InvitationMapper.php
@@ -97,9 +97,10 @@ class InvitationMapper extends QBMapper {
public function createInvitationFromRow(array $row): Invitation {
return $this->mapRowToEntity([
'id' => $row['id'],
- 'room_id' => $row['room_id'],
- 'user_id' => $row['user_id'],
- 'access_token' => $row['access_token'],
+ 'room_id' => (int) $row['room_id'],
+ 'user_id' => (string) $row['user_id'],
+ 'access_token' => (string) $row['access_token'],
+ 'remote_id' => (string) $row['remote_id'],
]);
}
}