Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • The first step added will be to check if the user creating the post and has access to PERMISSION_USE_GROUP_MENTIONS, if not then the behavior of SendNotifications will be unchanged

  • If group mentions are enabled then all groups that have AllowReference = 1 will be added to memory

  • The ExplicitMentions struct will have a new attribute GroupMentions to store the groups mentioned by the Post.Message.

  • Once all groups are added to the GroupMentions map, group members that exist in the channel will be added to the Mentions map as confirmed mentions in the channel.

  • Group members that exist in the team but not in the channel will be added to OtherPotentialMentions and will have an invite message generated for them using the existing logic.

  • If there are no group members in the team that the message is sent to, a system message will return be sent, letting the user know that the group mentioned has no members in the current team.

...

  • in the notification phase, when the aggregated number of group members to mention is above a certain threshold N(=5?), we are displaying a warning modal  (see wireframe), the text message in the modal specifies the user count from the largest group in the set of groups selected in the collectionfirst phase. This is a compromise solution, due to performance constraints further explained -see below.

  • For example, if we mention @developers and @board, where @developers has 10 users within the channel while @board only has 2 members in the channel, the warning modal will warn the user that she is about to notify @developers with 10 members in the channel.
    If two groups have common users the total count to be displayed by the dialog would have to be the union of members for each group within the channel. This would cause can be done but at a significant performance regressioncost (groups can have a large number of members).

Future work: Investigate a better solution?

...

  • A new selector will be added to get the list of groups that the current user can be mentioned by: getCurrentUserGroupMentionKeys - it will be used to determine which @group mentions should be highlighted in the chat facing UI. This selector will be used inside of getAllUserMentionKeys where we merge its set with the result of calling getCurrentUserMentionKeys (which contains regular mentions such as first name / user name etc).

  • New actions and selectors for getChannelMemberCountsByGroup have been added, which take a channelID and a boolean includeTimezones, flag as arguments and returns a list of all groups with members within the channel and number of members in that channel. If includeTimezones is true the function also returns the number of unique timezones for the users in that group.

...