Skip to content

Commit fb841e8

Browse files
committed
feat(chat): Expose summary-threshold in capabilities
Signed-off-by: Joas Schilling <[email protected]>
1 parent b9f206c commit fb841e8

21 files changed

+80
-8
lines changed

docs/capabilities.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,5 +161,6 @@
161161
* `talk-polls-drafts` - Whether moderators can store and retrieve poll drafts
162162
* `download-call-participants` - Whether the endpoints for moderators to download the call participants is available
163163
* `chat-summary-api` (local) - Whether the endpoint to get summarized chat messages in a conversation is available
164+
* `config => chat => summary-threshold` (local) - Number of unread messages that should exist to show a "Generate summary" option
164165
* `config => call => start-without-media` (local) - Boolean, whether media should be disabled when starting or joining a conversation
165166
* `config => call => max-duration` - Integer, maximum call duration in seconds. Please note that this should only be used with system cron and with a reasonable high value, due to the expended duration until the background job ran.

lib/Capabilities.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ class Capabilities implements IPublicCapability {
144144
'read-privacy',
145145
'has-translation-providers',
146146
'typing-privacy',
147+
'summary-threshold',
147148
],
148149
'conversations' => [
149150
'can-create',
@@ -217,6 +218,7 @@ public function getCapabilities(): array {
217218
'read-privacy' => Participant::PRIVACY_PUBLIC,
218219
'has-translation-providers' => $this->translationManager->hasProviders(),
219220
'typing-privacy' => Participant::PRIVACY_PUBLIC,
221+
'summary-threshold' => 100,
220222
],
221223
'conversations' => [
222224
'can-create' => $user instanceof IUser && !$this->talkConfig->isNotAllowedToCreateConversations($user)

lib/ResponseDefinitions.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,7 @@
354354
* read-privacy: int,
355355
* has-translation-providers: bool,
356356
* typing-privacy: int,
357+
* summary-threshold: positive-int,
357358
* },
358359
* conversations: array{
359360
* can-create: bool,

openapi-administration.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,8 @@
204204
"max-length",
205205
"read-privacy",
206206
"has-translation-providers",
207-
"typing-privacy"
207+
"typing-privacy",
208+
"summary-threshold"
208209
],
209210
"properties": {
210211
"max-length": {
@@ -221,6 +222,11 @@
221222
"typing-privacy": {
222223
"type": "integer",
223224
"format": "int64"
225+
},
226+
"summary-threshold": {
227+
"type": "integer",
228+
"format": "int64",
229+
"minimum": 1
224230
}
225231
}
226232
},

openapi-backend-recording.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,8 @@
137137
"max-length",
138138
"read-privacy",
139139
"has-translation-providers",
140-
"typing-privacy"
140+
"typing-privacy",
141+
"summary-threshold"
141142
],
142143
"properties": {
143144
"max-length": {
@@ -154,6 +155,11 @@
154155
"typing-privacy": {
155156
"type": "integer",
156157
"format": "int64"
158+
},
159+
"summary-threshold": {
160+
"type": "integer",
161+
"format": "int64",
162+
"minimum": 1
157163
}
158164
}
159165
},

openapi-backend-signaling.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,8 @@
137137
"max-length",
138138
"read-privacy",
139139
"has-translation-providers",
140-
"typing-privacy"
140+
"typing-privacy",
141+
"summary-threshold"
141142
],
142143
"properties": {
143144
"max-length": {
@@ -154,6 +155,11 @@
154155
"typing-privacy": {
155156
"type": "integer",
156157
"format": "int64"
158+
},
159+
"summary-threshold": {
160+
"type": "integer",
161+
"format": "int64",
162+
"minimum": 1
157163
}
158164
}
159165
},

openapi-backend-sipbridge.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,8 @@
180180
"max-length",
181181
"read-privacy",
182182
"has-translation-providers",
183-
"typing-privacy"
183+
"typing-privacy",
184+
"summary-threshold"
184185
],
185186
"properties": {
186187
"max-length": {
@@ -197,6 +198,11 @@
197198
"typing-privacy": {
198199
"type": "integer",
199200
"format": "int64"
201+
},
202+
"summary-threshold": {
203+
"type": "integer",
204+
"format": "int64",
205+
"minimum": 1
200206
}
201207
}
202208
},

openapi-bots.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,8 @@
137137
"max-length",
138138
"read-privacy",
139139
"has-translation-providers",
140-
"typing-privacy"
140+
"typing-privacy",
141+
"summary-threshold"
141142
],
142143
"properties": {
143144
"max-length": {
@@ -154,6 +155,11 @@
154155
"typing-privacy": {
155156
"type": "integer",
156157
"format": "int64"
158+
},
159+
"summary-threshold": {
160+
"type": "integer",
161+
"format": "int64",
162+
"minimum": 1
157163
}
158164
}
159165
},

openapi-federation.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,8 @@
180180
"max-length",
181181
"read-privacy",
182182
"has-translation-providers",
183-
"typing-privacy"
183+
"typing-privacy",
184+
"summary-threshold"
184185
],
185186
"properties": {
186187
"max-length": {
@@ -197,6 +198,11 @@
197198
"typing-privacy": {
198199
"type": "integer",
199200
"format": "int64"
201+
},
202+
"summary-threshold": {
203+
"type": "integer",
204+
"format": "int64",
205+
"minimum": 1
200206
}
201207
}
202208
},

openapi-full.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,8 @@
356356
"max-length",
357357
"read-privacy",
358358
"has-translation-providers",
359-
"typing-privacy"
359+
"typing-privacy",
360+
"summary-threshold"
360361
],
361362
"properties": {
362363
"max-length": {
@@ -373,6 +374,11 @@
373374
"typing-privacy": {
374375
"type": "integer",
375376
"format": "int64"
377+
},
378+
"summary-threshold": {
379+
"type": "integer",
380+
"format": "int64",
381+
"minimum": 1
376382
}
377383
}
378384
},

0 commit comments

Comments
 (0)