chore(message.py): add target_id argument to Message.ack classmethod

This commit is contained in:
2025-10-05 13:20:48 +02:00
parent 0e72c93d55
commit f307a7f457

View File

@@ -117,14 +117,19 @@ class Message:
return cls.from_json(data.decode("utf-8")) return cls.from_json(data.decode("utf-8"))
@classmethod @classmethod
def ack(cls) -> Message: def ack(cls, target_id: str) -> Message:
"""Create an ACK message. """Create an ACK message.
Args:
target_id (str): The ID of the message to acknowledge.
Returns: Returns:
Message: The created ACK message. Message: The created ACK message.
""" """
return cls( return cls(
category=Category.CONTROL, action=ControlAction.ACK, payload={} category=Category.CONTROL,
action=ControlAction.ACK,
payload={"target_id": target_id},
) )
@classmethod @classmethod