diff --git a/mattermost_matchmaker/matchmaking.py b/mattermost_matchmaker/matchmaking.py index 3d71d9cf42f689cefb16c305b29a8cfbf001eadf..c041f8baab38eb5cf48c9864d3dbd255b4692864 100644 --- a/mattermost_matchmaker/matchmaking.py +++ b/mattermost_matchmaker/matchmaking.py @@ -63,9 +63,18 @@ def create_group(client: mattermost.MMApi, ids: Iterable[str]) -> None: def make_matches_for_members(client: mattermost.MMApi, members: Iterable[dict], - group_size: int = 2) -> Tuple[List[str], str]: + group_size: int = 2) -> Tuple[List[str], Optional[str]]: """ Making matches in a channel + + Side effects: A Groupchat Channel will be created for the paired groups. + + A group chat would be created for the last group with less than group_size members (remainders) + if and only if there are more than 1 member in the remainder group. In this case, the second item + of the returned tuple would be None. + + If the remainder group would only consist of one member, instead of creating a group for them, it is returned as + the second item in the tuple. """ groups_created = []