Skip to content

Commit

Permalink
fix: Setting the 'isMember' Property During Notification Sending to E…
Browse files Browse the repository at this point in the history
…nsure Accurate Workspace Membership Verification - EXO-69364 - Meeds-io/meeds#1651

Before this change, users who were not members of a specific workspace
would receive notifications with the 'isMember' property set to null.
After this change, the 'isMember' property now returns the correct value
when users interact with notifications.

(cherry picked from commit c51b9ad)
  • Loading branch information
Jihed525 authored and exo-swf committed Feb 19, 2024
1 parent 23590da commit ce4bacb
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -752,6 +752,9 @@ public static SpaceEntity buildEntityFromSpace(Space space, String userId, Strin
spaceEntity.setIsManager(isManager);
spaceEntity.setIsRedactor(spaceService.isRedactor(space, userId));
spaceEntity.setIsPublisher(spaceService.isPublisher(space, userId));
} else if (space != null && StringUtils.isNotBlank(space.getId())) {
Identity currentUserIdentity = RestUtils.getCurrentUserIdentity();
spaceEntity.setIsMember(spaceService.isMember(space, currentUserIdentity.getRemoteId()));
}

PortalConfig portalConfig = getLayoutService().getPortalConfig(new SiteKey(GROUP, space.getGroupId()));
Expand Down

0 comments on commit ce4bacb

Please sign in to comment.