@@ -178,6 +178,8 @@ public function testGetCapabilitiesGuest(): void {
178178 ],
179179 'conversations ' => [
180180 'can-create ' => false ,
181+ 'can-create-group ' => false ,
182+ 'can-create-public ' =>false ,
181183 ],
182184 'previews ' => [
183185 'max-gif-size ' => 200000 ,
@@ -193,8 +195,8 @@ public function testGetCapabilitiesGuest(): void {
193195
194196 public function dataGetCapabilitiesUserAllowed (): array {
195197 return [
196- [true , false , Participant::PRIVACY_PRIVATE ],
197- [false , true , Participant::PRIVACY_PUBLIC ],
198+ [true , false , false , false , Participant::PRIVACY_PRIVATE ],
199+ [false , true , true , true , Participant::PRIVACY_PUBLIC ],
198200 ];
199201 }
200202
@@ -204,7 +206,13 @@ public function dataGetCapabilitiesUserAllowed(): array {
204206 * @param bool $canCreate
205207 * @param int $readPrivacy
206208 */
207- public function testGetCapabilitiesUserAllowed (bool $ isNotAllowed , bool $ canCreate , int $ readPrivacy ): void {
209+ public function testGetCapabilitiesUserAllowed (
210+ bool $ isNotAllowed ,
211+ bool $ canCreate ,
212+ bool $ canCreateGroup ,
213+ bool $ canCreatePublic ,
214+ int $ readPrivacy
215+ ): void {
208216 $ capabilities = new Capabilities (
209217 $ this ->serverConfig ,
210218 $ this ->talkConfig ,
@@ -240,6 +248,16 @@ public function testGetCapabilitiesUserAllowed(bool $isNotAllowed, bool $canCrea
240248 ->with ($ user )
241249 ->willReturn ($ isNotAllowed );
242250
251+ $ this ->talkConfig ->expects ($ this ->once ())
252+ ->method ('isNotAllowedToCreateGroupConversations ' )
253+ ->with ($ user )
254+ ->willReturn ($ isNotAllowed );
255+
256+ $ this ->talkConfig ->expects ($ this ->once ())
257+ ->method ('isNotAllowedToCreatePublicConversations ' )
258+ ->with ($ user )
259+ ->willReturn ($ isNotAllowed );
260+
243261 $ this ->talkConfig ->expects ($ this ->once ())
244262 ->method ('getUserReadPrivacy ' )
245263 ->with ('uid ' )
@@ -280,6 +298,8 @@ public function testGetCapabilitiesUserAllowed(bool $isNotAllowed, bool $canCrea
280298 ],
281299 'conversations ' => [
282300 'can-create ' => $ canCreate ,
301+ 'can-create-group ' => $ canCreateGroup ,
302+ 'can-create-public ' => $ canCreatePublic ,
283303 ],
284304 'previews ' => [
285305 'max-gif-size ' => 200000 ,
0 commit comments