Skip to content

Commit ab7f58b

Browse files
Merge pull request #59478 from nextcloud/backport/59407/stable32
[stable32] feat(talk): Allow to create conversations that are meetings
2 parents dd51a4b + b7f989b commit ab7f58b

2 files changed

Lines changed: 55 additions & 4 deletions

File tree

lib/private/Talk/ConversationOptions.php

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,11 @@
1212
use OCP\Talk\IConversationOptions;
1313

1414
class ConversationOptions implements IConversationOptions {
15-
private bool $isPublic;
16-
17-
private function __construct(bool $isPublic) {
18-
$this->isPublic = $isPublic;
15+
private function __construct(
16+
private bool $isPublic,
17+
private ?\DateTimeInterface $meetingStartDate = null,
18+
private ?\DateTimeInterface $meetingEndDate = null,
19+
) {
1920
}
2021

2122
public static function default(): self {
@@ -30,4 +31,18 @@ public function setPublic(bool $isPublic = true): IConversationOptions {
3031
public function isPublic(): bool {
3132
return $this->isPublic;
3233
}
34+
35+
public function setMeetingDate(\DateTimeInterface $meetingStartDate, \DateTimeInterface $meetingEndDate): IConversationOptions {
36+
$this->meetingStartDate = $meetingStartDate;
37+
$this->meetingEndDate = $meetingEndDate;
38+
return $this;
39+
}
40+
41+
public function getMeetingStartDate(): ?\DateTimeInterface {
42+
return $this->meetingStartDate;
43+
}
44+
45+
public function getMeetingEndDate(): ?\DateTimeInterface {
46+
return $this->meetingEndDate;
47+
}
3348
}

lib/public/Talk/IConversationOptions.php

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,40 @@ public function isPublic(): bool;
3030
* @since 24.0.0
3131
*/
3232
public function setPublic(bool $isPublic = true): self;
33+
34+
/**
35+
* Date of the meeting if the conversation is tied to a single meeting event
36+
*
37+
* This will be used by the Talk backend to expire the conversation after a
38+
* reasonable amount of time after the meeting unless the conversation is
39+
* being reused.
40+
*
41+
* @param \DateTimeInterface $meetingStartDate
42+
* @param \DateTimeInterface $meetingEndDate
43+
* @return $this
44+
* @since 34.0.0
45+
* @since 33.0.3
46+
* @since 32.0.9
47+
*/
48+
public function setMeetingDate(\DateTimeInterface $meetingStartDate, \DateTimeInterface $meetingEndDate): self;
49+
50+
/**
51+
* Start date of the meeting
52+
*
53+
* @return ?\DateTimeInterface
54+
* @since 34.0.0
55+
* @since 33.0.3
56+
* @since 32.0.9
57+
*/
58+
public function getMeetingStartDate(): ?\DateTimeInterface;
59+
60+
/**
61+
* End date of the meeting
62+
*
63+
* @return ?\DateTimeInterface
64+
* @since 34.0.0
65+
* @since 33.0.3
66+
* @since 32.0.9
67+
*/
68+
public function getMeetingEndDate(): ?\DateTimeInterface;
3369
}

0 commit comments

Comments
 (0)