File tree Expand file tree Collapse file tree 1 file changed +12
-11
lines changed
Expand file tree Collapse file tree 1 file changed +12
-11
lines changed Original file line number Diff line number Diff line change @@ -107,21 +107,22 @@ public function __construct(
107107 * @param Circle $circle
108108 */
109109 public function onCircleCreation (Circle $ circle ) {
110- if ($ this ->configService ->getAppValue (ConfigService::CIRCLES_ACTIVITY_ON_CREATION ) !== '1 '
111- || ($ circle ->getType () !== Circle::CIRCLES_PUBLIC
112- && $ circle ->getType () !== Circle::CIRCLES_CLOSED )) {
110+ if ($ circle ->getType () !== Circle::CIRCLES_PUBLIC
111+ && $ circle ->getType () !== Circle::CIRCLES_CLOSED ) {
113112 return ;
114113 }
115114
116- $ event = $ this ->generateEvent ('circles_as_non_member ' );
117- $ event ->setSubject ('circle_create ' , ['circle ' => json_encode ($ circle )]);
115+ if ($ this ->configService ->getAppValue (ConfigService::CIRCLES_ACTIVITY_ON_CREATION ) === '1 ' ) {
116+ $ event = $ this ->generateEvent ('circles_as_non_member ' );
117+ $ event ->setSubject ('circle_create ' , ['circle ' => json_encode ($ circle )]);
118118
119- $ this ->userManager ->callForSeenUsers (
120- function ($ user ) use ($ event ) {
121- /** @var IUser $user */
122- $ this ->publishEvent ($ event , [$ user ]);
123- }
124- );
119+ $ this ->userManager ->callForSeenUsers (
120+ function ($ user ) use ($ event ) {
121+ /** @var IUser $user */
122+ $ this ->publishEvent ($ event , [$ user ]);
123+ }
124+ );
125+ }
125126
126127 $ this ->dispatch ('\OCA\Circles::onCircleCreation ' , ['circle ' => $ circle ]);
127128 }
You can’t perform that action at this time.
0 commit comments