Skip to content

Commit bb0841b

Browse files
Merge pull request #59407 from nextcloud/bugfix/noid/make-appointments-talk-meetings
feat(talk): Allow to create conversations that are meetings
2 parents 51cde1a + 3f52005 commit bb0841b

2 files changed

Lines changed: 52 additions & 0 deletions

File tree

lib/private/Talk/ConversationOptions.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
class ConversationOptions implements IConversationOptions {
1515
private function __construct(
1616
private bool $isPublic,
17+
private ?\DateTimeInterface $meetingStartDate = null,
18+
private ?\DateTimeInterface $meetingEndDate = null,
1719
) {
1820
}
1921

@@ -29,4 +31,18 @@ public function setPublic(bool $isPublic = true): IConversationOptions {
2931
public function isPublic(): bool {
3032
return $this->isPublic;
3133
}
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+
}
3248
}

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)