generated from pufereq/python-template
chore(message.py): add target_id argument to Message.ack classmethod
This commit is contained in:
@@ -117,14 +117,19 @@ class Message:
|
||||
return cls.from_json(data.decode("utf-8"))
|
||||
|
||||
@classmethod
|
||||
def ack(cls) -> Message:
|
||||
def ack(cls, target_id: str) -> Message:
|
||||
"""Create an ACK message.
|
||||
|
||||
Args:
|
||||
target_id (str): The ID of the message to acknowledge.
|
||||
|
||||
Returns:
|
||||
Message: The created ACK message.
|
||||
"""
|
||||
return cls(
|
||||
category=Category.CONTROL, action=ControlAction.ACK, payload={}
|
||||
category=Category.CONTROL,
|
||||
action=ControlAction.ACK,
|
||||
payload={"target_id": target_id},
|
||||
)
|
||||
|
||||
@classmethod
|
||||
|
||||
Reference in New Issue
Block a user