update client

This commit is contained in:
Alex Petric
2025-02-06 10:53:11 -05:00
parent 9275875a36
commit db17d75e60
2 changed files with 70 additions and 9 deletions
+5 -5
View File
@@ -710,11 +710,11 @@ class Windmill:
return self.get(f"/w/{self.workspace}/users/username_to_email/{username}").text
def update_teams_activity(self, activity_id: str, text: str, success: bool = True):
def send_teams_message(self, conversation_id: str, text: str, success: bool = True):
"""
Send an update to a Microsoft Teams activity after a workspace command is run
Send a message to a Microsoft Teams conversation with conversation_id, where success is used to style the message
"""
return self.post(f"/teams/activities", json={"activity_id": activity_id, "text": text, "success": success})
return self.post(f"/teams/activities", json={"conversation_id": conversation_id, "text": text, "success": success})
def init_global_client(f):
@@ -1076,8 +1076,8 @@ def request_interactive_slack_approval(
)
@init_global_client
def update_teams_activity(activity_id: str, text: str, success: bool):
return _client.update_teams_activity(activity_id, text, success)
def send_teams_message(conversation_id: str, text: str, success: bool):
return _client.send_teams_message(conversation_id, text, success)
@init_global_client
def cancel_running() -> dict: