Skip to content

Commit

Permalink
版本推进至0.9.2
Browse files Browse the repository at this point in the history
+ group_message事件的sender任何时候都有role
  • Loading branch information
lunzhiPenxil committed Oct 26, 2022
1 parent bf389ba commit a3837b0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions OlivOSOnebotV11/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"namespace" : "OlivOSOnebotV11",
"info" : "基于OlivOS的OneBot协议端,可以基于OlivOS实现多后端对多账号、多平台的支持。",
"message_mode" : "olivos_para",
"version" : "0.9.1",
"svn" : 15,
"version" : "0.9.2",
"svn" : 16,
"compatible_svn" : 100,
"priority" : 50000,
"support" : [
Expand Down
8 changes: 5 additions & 3 deletions OlivOSOnebotV11/eventRouter.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,11 @@ def group_message(eventObj):
eventObj.rvData['anonymous'] = None
eventObj.rvData['font'] = eventObj.plugin_event.data.font
eventObj.rvData['sender'] = {}
eventObj.rvData['sender']['user_id'] = eventObj.plugin_event.data.sender['id']
eventObj.rvData['sender']['user_id'] = int(eventObj.plugin_event.data.sender['id'])
eventObj.rvData['sender']['nickname'] = eventObj.plugin_event.data.sender['name']
eventObj.rvData['sender']['role'] = 'owner'
if 'role' in eventObj.plugin_event.data.sender:
eventObj.rvData['sender']['role'] = eventObj.plugin_event.data.sender['role']
updateHostIdDict(
botHash = eventObj.plugin_event.bot_info.hash,
hostId = eventObj.plugin_event.data.host_id,
Expand All @@ -221,7 +224,7 @@ def private_message(eventObj):
eventObj.rvData['raw_message'] = paraMapper(eventObj.plugin_event.data.raw_message.data)
eventObj.rvData['font'] = eventObj.plugin_event.data.font
eventObj.rvData['sender'] = {}
eventObj.rvData['sender']['user_id'] = eventObj.plugin_event.data.sender['id']
eventObj.rvData['sender']['user_id'] = int(eventObj.plugin_event.data.sender['id'])
eventObj.rvData['sender']['nickname'] = eventObj.plugin_event.data.sender['name']

class txEvent(object):
Expand Down Expand Up @@ -270,7 +273,6 @@ def doInit(self):
)

def doRouter(self):
#print(self.json)
try:
if self.active:
if hasattr(actionRouter, self.funcType):
Expand Down

0 comments on commit a3837b0

Please sign in to comment.