2828use OCA \Talk \Config ;
2929use OCA \Talk \Participant ;
3030use OCA \Talk \Room ;
31+ use OCA \Talk \Service \ParticipantService ;
3132use OCP \Http \Client \IClientService ;
3233use OCP \IURLGenerator ;
3334use OCP \Security \ISecureRandom ;
@@ -44,6 +45,8 @@ class BackendNotifier {
4445 private $ secureRandom ;
4546 /** @var Manager */
4647 private $ signalingManager ;
48+ /** @var ParticipantService */
49+ private $ participantService ;
4750 /** @var IUrlGenerator */
4851 private $ urlGenerator ;
4952
@@ -52,12 +55,14 @@ public function __construct(Config $config,
5255 IClientService $ clientService ,
5356 ISecureRandom $ secureRandom ,
5457 Manager $ signalingManager ,
58+ ParticipantService $ participantService ,
5559 IURLGenerator $ urlGenerator ) {
5660 $ this ->config = $ config ;
5761 $ this ->logger = $ logger ;
5862 $ this ->clientService = $ clientService ;
5963 $ this ->secureRandom = $ secureRandom ;
6064 $ this ->signalingManager = $ signalingManager ;
65+ $ this ->participantService = $ participantService ;
6166 $ this ->urlGenerator = $ urlGenerator ;
6267 }
6368
@@ -149,7 +154,7 @@ public function roomInvited(Room $room, array $users): void {
149154 'userids ' => $ userIds ,
150155 // TODO(fancycode): We should try to get rid of 'alluserids' and
151156 // find a better way to notify existing users to update the room.
152- 'alluserids ' => $ room -> getParticipantUserIds (),
157+ 'alluserids ' => $ this -> participantService -> getParticipantUserIds ($ room ),
153158 'properties ' => $ room ->getPropertiesForSignaling ('' ),
154159 ],
155160 ]);
@@ -170,7 +175,7 @@ public function roomsDisinvited(Room $room, array $userIds): void {
170175 'userids ' => $ userIds ,
171176 // TODO(fancycode): We should try to get rid of 'alluserids' and
172177 // find a better way to notify existing users to update the room.
173- 'alluserids ' => $ room -> getParticipantUserIds (),
178+ 'alluserids ' => $ this -> participantService -> getParticipantUserIds ($ room ),
174179 'properties ' => $ room ->getPropertiesForSignaling ('' ),
175180 ],
176181 ]);
@@ -191,7 +196,7 @@ public function roomSessionsRemoved(Room $room, array $sessionIds): void {
191196 'sessionids ' => $ sessionIds ,
192197 // TODO(fancycode): We should try to get rid of 'alluserids' and
193198 // find a better way to notify existing users to update the room.
194- 'alluserids ' => $ room -> getParticipantUserIds (),
199+ 'alluserids ' => $ this -> participantService -> getParticipantUserIds ($ room ),
195200 'properties ' => $ room ->getPropertiesForSignaling ('' ),
196201 ],
197202 ]);
@@ -208,7 +213,7 @@ public function roomModified(Room $room): void {
208213 $ this ->backendRequest ($ room , [
209214 'type ' => 'update ' ,
210215 'update ' => [
211- 'userids ' => $ room -> getParticipantUserIds (),
216+ 'userids ' => $ this -> participantService -> getParticipantUserIds ($ room ),
212217 'properties ' => $ room ->getPropertiesForSignaling ('' ),
213218 ],
214219 ]);
0 commit comments