Skip to content
Snippets Groups Projects
Commit 87a6e18b authored by Tamas Kiss's avatar Tamas Kiss
Browse files

fix: "from_webhook" post prop explicitly set to False

parent 6c8b55e5
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,7 @@ import mattermost # type: ignore
#pylint: disable=invalid-name
props = {"from_webhook": "false"}
def random_nonrepeating_tuples(population: Iterable, n: int) -> Generator[tuple, None, None]:
"""
......@@ -37,18 +38,18 @@ def matching_in_channel(client: mattermost.MMApi, channel_id: str,
if len(members) < minimum_members:
if too_few_message:
client.create_post(channel_id=channel_id, message=too_few_message)
client.create_post(channel_id=channel_id, message=too_few_message, props=props)
return
groups_created, left_out = make_matches_for_members(client, members, group_size)
if group_hail:
for group_id in groups_created:
client.create_post(channel_id=group_id, message=group_hail)
client.create_post(channel_id=group_id, message=group_hail, props=props)
if left_out_message and left_out is not None:
user_data = client.get_user(left_out)
client.create_post(channel_id=channel_id, message=left_out_message.format(user=user_data))
client.create_post(channel_id=channel_id, message=left_out_message.format(user=user_data), props=props)
def create_group(client: mattermost.MMApi, ids: Iterable[str]) -> str:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment