generated from pufereq/python-template
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8c4b49f0d7 | ||
|
f307a7f457
|
@@ -2,6 +2,12 @@
|
|||||||
|
|
||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
|
## [0.4.1] - 2025-10-05
|
||||||
|
|
||||||
|
### Miscellaneous Tasks
|
||||||
|
|
||||||
|
- [`f307a7f`](https://gitea.pufereq.pl/judas/judas_protocol/commit/f307a7f457924ff1717ed4c8ce195ce022dd5680) **message.py**: add `target_id` argument to `Message.ack` classmethod
|
||||||
|
|
||||||
## [0.4.0] - 2025-10-05
|
## [0.4.0] - 2025-10-05
|
||||||
|
|
||||||
### Features
|
### Features
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ build-backend = "uv_build"
|
|||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "judas_protocol"
|
name = "judas_protocol"
|
||||||
version = "0.4.0"
|
version = "0.4.1"
|
||||||
description = "The judas protocol"
|
description = "The judas protocol"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
authors = []
|
authors = []
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user