Skip to content

Commit b436f78

Browse files
committed
refacotr: KookCardMessageContainer.from_dict能正确返回自身类型了
1 parent 31741d1 commit b436f78

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

astrbot/core/platform/sources/kook/kook_types.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ def to_json(self, indent: int | None = None, ensure_ascii: bool = True) -> str:
263263

264264
@classmethod
265265
def from_dict(cls, raw_data: list[dict[str, Any]]):
266-
return [KookCardMessage.from_dict(item) for item in raw_data]
266+
return cls(KookCardMessage.from_dict(item) for item in raw_data)
267267

268268

269269
class OrderMessage(BaseModel):

0 commit comments

Comments
 (0)