From 85e05ccb91c1f8d82c15dc9568235fe8cb6c6f00 Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Thu, 9 Apr 2020 08:06:49 +0200 Subject: [PATCH] Automatically mark the user as following the group --- src/controllers/GroupsController.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/controllers/GroupsController.ts b/src/controllers/GroupsController.ts index 6b0f632..bcb6f8b 100644 --- a/src/controllers/GroupsController.ts +++ b/src/controllers/GroupsController.ts @@ -328,6 +328,10 @@ export class GroupsController { // Respond to the invitation await GroupsHelper.RespondInvitation(groupID, h.getUserId(), accept); + // Mark automatically the user as following if he accepted the invitation + if(accept) + await GroupsHelper.SetFollowing(groupID, h.getUserId(), true); + // Create a notification await NotificationsHelper.CreateGroupMembershipNotification( h.getUserId(), 0, groupID,