mirror of
https://github.com/Mrs4s/MiraiGo.git
synced 2025-05-04 19:17:38 +08:00
fix: drop oneof in oidb.D89AGroupinfo
RomiChan/protobuf don't support oneof now
This commit is contained in:
parent
5ff69f3c3a
commit
503db83375
@ -956,15 +956,14 @@ func (c *QQClient) buildGroupMemoUpdatePacket(groupCode int64, newMemo string) (
|
|||||||
|
|
||||||
// OidbSvc.0x89a_0
|
// OidbSvc.0x89a_0
|
||||||
func (c *QQClient) buildGroupMuteAllPacket(groupCode int64, mute bool) (uint16, []byte) {
|
func (c *QQClient) buildGroupMuteAllPacket(groupCode int64, mute bool) (uint16, []byte) {
|
||||||
|
shutUpTime := int32(0)
|
||||||
|
if mute {
|
||||||
|
shutUpTime = 268435455
|
||||||
|
}
|
||||||
body := &oidb.D89AReqBody{
|
body := &oidb.D89AReqBody{
|
||||||
GroupCode: groupCode,
|
GroupCode: groupCode,
|
||||||
StGroupInfo: &oidb.D89AGroupinfo{
|
StGroupInfo: &oidb.D89AGroupinfo{
|
||||||
ShutupTime: &oidb.D89AGroupinfo_Val{Val: func() int32 {
|
ShutupTime: shutUpTime,
|
||||||
if mute {
|
|
||||||
return 268435455
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}()},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
return c.buildGroupOperationPacket(body)
|
return c.buildGroupOperationPacket(body)
|
||||||
|
@ -222,30 +222,28 @@ type D89AGroupinfo struct {
|
|||||||
StGroupNewguidelines *D89AGroupNewGuidelinesInfo `protobuf:"bytes,14,opt"`
|
StGroupNewguidelines *D89AGroupNewGuidelinesInfo `protobuf:"bytes,14,opt"`
|
||||||
GroupFace int32 `protobuf:"varint,15,opt"`
|
GroupFace int32 `protobuf:"varint,15,opt"`
|
||||||
AddOption int32 `protobuf:"varint,16,opt"`
|
AddOption int32 `protobuf:"varint,16,opt"`
|
||||||
// Types that are assignable to ShutupTime:
|
ShutupTime int32 `protobuf:"varint,17,opt"`
|
||||||
// *D89AGroupinfo_Val
|
GroupTypeFlag int32 `protobuf:"varint,18,opt"`
|
||||||
ShutupTime isD89AGroupinfo_ShutupTime `protobuf_oneof:"shutupTime"`
|
StringGroupTag []byte `protobuf:"bytes,19,opt"`
|
||||||
GroupTypeFlag int32 `protobuf:"varint,18,opt"`
|
MsgGroupGeoInfo *D89AGroupGeoInfo `protobuf:"bytes,20,opt"`
|
||||||
StringGroupTag []byte `protobuf:"bytes,19,opt"`
|
GroupClassExt int32 `protobuf:"varint,21,opt"`
|
||||||
MsgGroupGeoInfo *D89AGroupGeoInfo `protobuf:"bytes,20,opt"`
|
IngGroupClassText []byte `protobuf:"bytes,22,opt"`
|
||||||
GroupClassExt int32 `protobuf:"varint,21,opt"`
|
AppPrivilegeFlag int32 `protobuf:"varint,23,opt"`
|
||||||
IngGroupClassText []byte `protobuf:"bytes,22,opt"`
|
AppPrivilegeMask int32 `protobuf:"varint,24,opt"`
|
||||||
AppPrivilegeFlag int32 `protobuf:"varint,23,opt"`
|
StGroupExInfo *D89AGroupExInfoOnly `protobuf:"bytes,25,opt"`
|
||||||
AppPrivilegeMask int32 `protobuf:"varint,24,opt"`
|
GroupSecLevel int32 `protobuf:"varint,26,opt"`
|
||||||
StGroupExInfo *D89AGroupExInfoOnly `protobuf:"bytes,25,opt"`
|
GroupSecLevelInfo int32 `protobuf:"varint,27,opt"`
|
||||||
GroupSecLevel int32 `protobuf:"varint,26,opt"`
|
SubscriptionUin int64 `protobuf:"varint,28,opt"`
|
||||||
GroupSecLevelInfo int32 `protobuf:"varint,27,opt"`
|
AllowMemberInvite int32 `protobuf:"varint,29,opt"`
|
||||||
SubscriptionUin int64 `protobuf:"varint,28,opt"`
|
IngGroupQuestion []byte `protobuf:"bytes,30,opt"`
|
||||||
AllowMemberInvite int32 `protobuf:"varint,29,opt"`
|
IngGroupAnswer []byte `protobuf:"bytes,31,opt"`
|
||||||
IngGroupQuestion []byte `protobuf:"bytes,30,opt"`
|
GroupFlagext3 int32 `protobuf:"varint,32,opt"`
|
||||||
IngGroupAnswer []byte `protobuf:"bytes,31,opt"`
|
GroupFlagext3Mask int32 `protobuf:"varint,33,opt"`
|
||||||
GroupFlagext3 int32 `protobuf:"varint,32,opt"`
|
GroupOpenAppid int32 `protobuf:"varint,34,opt"`
|
||||||
GroupFlagext3Mask int32 `protobuf:"varint,33,opt"`
|
NoFingerOpenFlag int32 `protobuf:"varint,35,opt"`
|
||||||
GroupOpenAppid int32 `protobuf:"varint,34,opt"`
|
NoCodeFingerOpenFlag int32 `protobuf:"varint,36,opt"`
|
||||||
NoFingerOpenFlag int32 `protobuf:"varint,35,opt"`
|
RootId int64 `protobuf:"varint,37,opt"`
|
||||||
NoCodeFingerOpenFlag int32 `protobuf:"varint,36,opt"`
|
MsgLimitFrequency int32 `protobuf:"varint,38,opt"`
|
||||||
RootId int64 `protobuf:"varint,37,opt"`
|
|
||||||
MsgLimitFrequency int32 `protobuf:"varint,38,opt"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *D89AGroupinfo) GetGroupExtAdmNum() int32 {
|
func (x *D89AGroupinfo) GetGroupExtAdmNum() int32 {
|
||||||
@ -360,16 +358,9 @@ func (x *D89AGroupinfo) GetAddOption() int32 {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *D89AGroupinfo) GetShutupTime() isD89AGroupinfo_ShutupTime {
|
func (x *D89AGroupinfo) GetShutupTime() int32 {
|
||||||
if m != nil {
|
if x != nil {
|
||||||
return m.ShutupTime
|
return x.ShutupTime
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *D89AGroupinfo) GetVal() int32 {
|
|
||||||
if x, ok := x.GetShutupTime().(*D89AGroupinfo_Val); ok {
|
|
||||||
return x.Val
|
|
||||||
}
|
}
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
@ -521,16 +512,6 @@ func (x *D89AGroupinfo) GetMsgLimitFrequency() int32 {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
type isD89AGroupinfo_ShutupTime interface {
|
|
||||||
isD89AGroupinfo_ShutupTime()
|
|
||||||
}
|
|
||||||
|
|
||||||
type D89AGroupinfo_Val struct {
|
|
||||||
Val int32 `protobuf:"varint,17,opt"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func (*D89AGroupinfo_Val) isD89AGroupinfo_ShutupTime() {}
|
|
||||||
|
|
||||||
type D89AGroupNewGuidelinesInfo struct {
|
type D89AGroupNewGuidelinesInfo struct {
|
||||||
BoolEnabled bool `protobuf:"varint,1,opt"`
|
BoolEnabled bool `protobuf:"varint,1,opt"`
|
||||||
IngContent []byte `protobuf:"bytes,2,opt"`
|
IngContent []byte `protobuf:"bytes,2,opt"`
|
||||||
|
@ -57,9 +57,7 @@ message D89AGroupinfo {
|
|||||||
D89AGroupNewGuidelinesInfo stGroupNewguidelines = 14;
|
D89AGroupNewGuidelinesInfo stGroupNewguidelines = 14;
|
||||||
int32 groupFace = 15;
|
int32 groupFace = 15;
|
||||||
int32 addOption = 16;
|
int32 addOption = 16;
|
||||||
oneof shutupTime {
|
int32 shutupTime = 17;
|
||||||
int32 val = 17;
|
|
||||||
}
|
|
||||||
int32 groupTypeFlag = 18;
|
int32 groupTypeFlag = 18;
|
||||||
bytes stringGroupTag = 19;
|
bytes stringGroupTag = 19;
|
||||||
D89AGroupGeoInfo msgGroupGeoInfo = 20;
|
D89AGroupGeoInfo msgGroupGeoInfo = 20;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user