Skip to content

Commit

Permalink
🐛 version 0.12.5
Browse files Browse the repository at this point in the history
fix MessageUpdate/Delete type
  • Loading branch information
RF-Tar-Railt committed Sep 5, 2024
1 parent 0a60bce commit 2646f94
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions nonebot/adapters/satori/event.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,10 @@ def convert(self):
class MessageDeletedEvent(MessageEvent):
__type__ = EventType.MESSAGE_DELETED

@override
def get_type(self) -> str:
return "notice"

def convert(self):
if self.channel.type == ChannelType.DIRECT:
return type_validate_python(PrivateMessageDeletedEvent, model_dump(self))
Expand All @@ -284,6 +288,10 @@ def convert(self):
class MessageUpdatedEvent(MessageEvent):
__type__ = EventType.MESSAGE_UPDATED

@override
def get_type(self) -> str:
return "notice"

def convert(self):
if self.channel.type == ChannelType.DIRECT:
return type_validate_python(PrivateMessageUpdatedEvent, model_dump(self))
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "nonebot-adapter-satori"
version = "0.12.4"
version = "0.12.5"
description = "Satori Protocol Adapter for Nonebot2"
authors = [
{name = "RF-Tar-Railt",email = "[email protected]"},
Expand Down

0 comments on commit 2646f94

Please sign in to comment.