mirror of
https://github.com/Mrs4s/MiraiGo.git
synced 2025-05-05 03:23:50 +08:00
add: group poke sending.
This commit is contained in:
parent
498ec93183
commit
07c7ab1e98
@ -915,6 +915,24 @@ func (c *QQClient) buildGroupMutePacket(groupCode, memberUin int64, time uint32)
|
|||||||
return seq, packet
|
return seq, packet
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// OidbSvc.0xed3
|
||||||
|
func (c *QQClient) buildGroupPokePacket(groupCode, target int64) (uint16, []byte) {
|
||||||
|
seq := c.nextSeq()
|
||||||
|
body := &oidb.DED3ReqBody{
|
||||||
|
ToUin: target,
|
||||||
|
GroupCode: groupCode,
|
||||||
|
}
|
||||||
|
b, _ := proto.Marshal(body)
|
||||||
|
req := &oidb.OIDBSSOPkg{
|
||||||
|
Command: 3795,
|
||||||
|
ServiceType: 1,
|
||||||
|
Bodybuffer: b,
|
||||||
|
}
|
||||||
|
payload, _ := proto.Marshal(req)
|
||||||
|
packet := packets.BuildUniPacket(c.Uin, seq, "OidbSvc.0xed3", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload)
|
||||||
|
return seq, packet
|
||||||
|
}
|
||||||
|
|
||||||
// OidbSvc.0x55c_1
|
// OidbSvc.0x55c_1
|
||||||
func (c *QQClient) buildGroupAdminSetPacket(groupCode, member int64, flag bool) (uint16, []byte) {
|
func (c *QQClient) buildGroupAdminSetPacket(groupCode, member int64, flag bool) (uint16, []byte) {
|
||||||
seq := c.nextSeq()
|
seq := c.nextSeq()
|
||||||
|
@ -526,6 +526,10 @@ func (c *QQClient) sendGroupLongOrForwardMessage(groupCode int64, isLong bool, m
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *QQClient) sendGroupPoke(groupCode, target int64) {
|
||||||
|
_, _ = c.sendAndWait(c.buildGroupPokePacket(groupCode, target))
|
||||||
|
}
|
||||||
|
|
||||||
func (c *QQClient) RecallGroupMessage(groupCode int64, msgId, msgInternalId int32) {
|
func (c *QQClient) RecallGroupMessage(groupCode int64, msgId, msgInternalId int32) {
|
||||||
_, pkt := c.buildGroupRecallPacket(groupCode, msgId, msgInternalId)
|
_, pkt := c.buildGroupRecallPacket(groupCode, msgId, msgInternalId)
|
||||||
_ = c.send(pkt)
|
_ = c.send(pkt)
|
||||||
|
@ -263,6 +263,10 @@ func (m *GroupMemberInfo) EditCard(card string) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (m *GroupMemberInfo) Poke() {
|
||||||
|
m.Group.client.sendGroupPoke(m.Group.Code, m.Uin)
|
||||||
|
}
|
||||||
|
|
||||||
func (m *GroupMemberInfo) SetAdmin(flag bool) {
|
func (m *GroupMemberInfo) SetAdmin(flag bool) {
|
||||||
if m.Group.OwnerUin == m.Group.client.Uin {
|
if m.Group.OwnerUin == m.Group.client.Uin {
|
||||||
m.Group.client.setGroupAdmin(m.Group.Code, m.Uin, flag)
|
m.Group.client.setGroupAdmin(m.Group.Code, m.Uin, flag)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.25.0
|
// protoc-gen-go v1.25.0
|
||||||
// protoc v3.12.3
|
// protoc v3.11.4
|
||||||
// source: oidb.proto
|
// source: oidb.proto
|
||||||
|
|
||||||
package oidb
|
package oidb
|
||||||
@ -1445,6 +1445,85 @@ func (x *D8FCClientInfo) GetIngClientver() string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type DED3ReqBody struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
ToUin int64 `protobuf:"varint,1,opt,name=toUin,proto3" json:"toUin,omitempty"`
|
||||||
|
GroupCode int64 `protobuf:"varint,2,opt,name=groupCode,proto3" json:"groupCode,omitempty"`
|
||||||
|
MsgSeq int32 `protobuf:"varint,3,opt,name=msgSeq,proto3" json:"msgSeq,omitempty"`
|
||||||
|
MsgRand int32 `protobuf:"varint,4,opt,name=msgRand,proto3" json:"msgRand,omitempty"`
|
||||||
|
AioUin int64 `protobuf:"varint,5,opt,name=aioUin,proto3" json:"aioUin,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *DED3ReqBody) Reset() {
|
||||||
|
*x = DED3ReqBody{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_oidb_proto_msgTypes[15]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *DED3ReqBody) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*DED3ReqBody) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *DED3ReqBody) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_oidb_proto_msgTypes[15]
|
||||||
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use DED3ReqBody.ProtoReflect.Descriptor instead.
|
||||||
|
func (*DED3ReqBody) Descriptor() ([]byte, []int) {
|
||||||
|
return file_oidb_proto_rawDescGZIP(), []int{15}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *DED3ReqBody) GetToUin() int64 {
|
||||||
|
if x != nil {
|
||||||
|
return x.ToUin
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *DED3ReqBody) GetGroupCode() int64 {
|
||||||
|
if x != nil {
|
||||||
|
return x.GroupCode
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *DED3ReqBody) GetMsgSeq() int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.MsgSeq
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *DED3ReqBody) GetMsgRand() int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.MsgRand
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *DED3ReqBody) GetAioUin() int64 {
|
||||||
|
if x != nil {
|
||||||
|
return x.AioUin
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
var File_oidb_proto protoreflect.FileDescriptor
|
var File_oidb_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
var file_oidb_proto_rawDesc = []byte{
|
var file_oidb_proto_rawDesc = []byte{
|
||||||
@ -1707,8 +1786,17 @@ var file_oidb_proto_rawDesc = []byte{
|
|||||||
0x0a, 0x06, 0x69, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06,
|
0x0a, 0x06, 0x69, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06,
|
||||||
0x69, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x69, 0x6e, 0x67, 0x43, 0x6c, 0x69,
|
0x69, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x69, 0x6e, 0x67, 0x43, 0x6c, 0x69,
|
||||||
0x65, 0x6e, 0x74, 0x76, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x69, 0x6e,
|
0x65, 0x6e, 0x74, 0x76, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x69, 0x6e,
|
||||||
0x67, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x76, 0x65, 0x72, 0x42, 0x08, 0x5a, 0x06, 0x2e, 0x3b,
|
0x67, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x76, 0x65, 0x72, 0x22, 0x8b, 0x01, 0x0a, 0x0b, 0x44,
|
||||||
0x6f, 0x69, 0x64, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
0x45, 0x44, 0x33, 0x52, 0x65, 0x71, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f,
|
||||||
|
0x55, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x74, 0x6f, 0x55, 0x69, 0x6e,
|
||||||
|
0x12, 0x1c, 0x0a, 0x09, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20,
|
||||||
|
0x01, 0x28, 0x03, 0x52, 0x09, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x16,
|
||||||
|
0x0a, 0x06, 0x6d, 0x73, 0x67, 0x53, 0x65, 0x71, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06,
|
||||||
|
0x6d, 0x73, 0x67, 0x53, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x73, 0x67, 0x52, 0x61, 0x6e,
|
||||||
|
0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6d, 0x73, 0x67, 0x52, 0x61, 0x6e, 0x64,
|
||||||
|
0x12, 0x16, 0x0a, 0x06, 0x61, 0x69, 0x6f, 0x55, 0x69, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03,
|
||||||
|
0x52, 0x06, 0x61, 0x69, 0x6f, 0x55, 0x69, 0x6e, 0x42, 0x08, 0x5a, 0x06, 0x2e, 0x3b, 0x6f, 0x69,
|
||||||
|
0x64, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@ -1723,7 +1811,7 @@ func file_oidb_proto_rawDescGZIP() []byte {
|
|||||||
return file_oidb_proto_rawDescData
|
return file_oidb_proto_rawDescData
|
||||||
}
|
}
|
||||||
|
|
||||||
var file_oidb_proto_msgTypes = make([]protoimpl.MessageInfo, 15)
|
var file_oidb_proto_msgTypes = make([]protoimpl.MessageInfo, 16)
|
||||||
var file_oidb_proto_goTypes = []interface{}{
|
var file_oidb_proto_goTypes = []interface{}{
|
||||||
(*OIDBSSOPkg)(nil), // 0: OIDBSSOPkg
|
(*OIDBSSOPkg)(nil), // 0: OIDBSSOPkg
|
||||||
(*D8A0RspBody)(nil), // 1: D8A0RspBody
|
(*D8A0RspBody)(nil), // 1: D8A0RspBody
|
||||||
@ -1740,6 +1828,7 @@ var file_oidb_proto_goTypes = []interface{}{
|
|||||||
(*D8FCCardNameElem)(nil), // 12: D8FCCardNameElem
|
(*D8FCCardNameElem)(nil), // 12: D8FCCardNameElem
|
||||||
(*D8FCLevelName)(nil), // 13: D8FCLevelName
|
(*D8FCLevelName)(nil), // 13: D8FCLevelName
|
||||||
(*D8FCClientInfo)(nil), // 14: D8FCClientInfo
|
(*D8FCClientInfo)(nil), // 14: D8FCClientInfo
|
||||||
|
(*DED3ReqBody)(nil), // 15: DED3ReqBody
|
||||||
}
|
}
|
||||||
var file_oidb_proto_depIdxs = []int32{
|
var file_oidb_proto_depIdxs = []int32{
|
||||||
2, // 0: D8A0RspBody.msgKickResult:type_name -> D8A0KickResult
|
2, // 0: D8A0RspBody.msgKickResult:type_name -> D8A0KickResult
|
||||||
@ -1945,6 +2034,18 @@ func file_oidb_proto_init() {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
file_oidb_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*DED3ReqBody); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
file_oidb_proto_msgTypes[7].OneofWrappers = []interface{}{
|
file_oidb_proto_msgTypes[7].OneofWrappers = []interface{}{
|
||||||
(*D89AGroupinfo_Val)(nil),
|
(*D89AGroupinfo_Val)(nil),
|
||||||
@ -1955,7 +2056,7 @@ func file_oidb_proto_init() {
|
|||||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
RawDescriptor: file_oidb_proto_rawDesc,
|
RawDescriptor: file_oidb_proto_rawDesc,
|
||||||
NumEnums: 0,
|
NumEnums: 0,
|
||||||
NumMessages: 15,
|
NumMessages: 16,
|
||||||
NumExtensions: 0,
|
NumExtensions: 0,
|
||||||
NumServices: 0,
|
NumServices: 0,
|
||||||
},
|
},
|
||||||
|
@ -146,3 +146,11 @@ message D8FCClientInfo {
|
|||||||
int32 implat = 1;
|
int32 implat = 1;
|
||||||
string ingClientver = 2;
|
string ingClientver = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
message DED3ReqBody {
|
||||||
|
int64 toUin = 1;
|
||||||
|
int64 groupCode = 2;
|
||||||
|
int32 msgSeq = 3;
|
||||||
|
int32 msgRand = 4;
|
||||||
|
int64 aioUin = 5;
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user