@@ -29,7 +29,10 @@ const CMD = {
29
29
GROUP_LIST : "friendlist.GetTroopListReqV2" , //send,recv
30
30
MEMBER_LIST : "friendlist.GetTroopMemberListReq" , //send,recv
31
31
GROUP_CARD : "friendlist.ModifyGroupCardReq" , //send,recv
32
- ADD_FRIEND : "" ,
32
+
33
+ ADD_SETTING : "friendlist.getUserAddFriendSetting" , //send,recv
34
+ ADD_FRIEND : "friendlist.addFriend" , //send,recv
35
+ DEL_FRIEND : "friendlist.delFriend" , //send,recv
33
36
34
37
FRIEND_REQ : "ProfileService.Pb.ReqSystemMsgNew.Friend" , //send,recv
35
38
FRIEND_REQ_ACT : "ProfileService.Pb.ReqSystemMsgAction.Friend" , //send,recv
@@ -45,7 +48,7 @@ const CMD = {
45
48
GROUP_LEAVE : "ProfileService.GroupMngReq" , //send,recv
46
49
GROUP_KICK : "OidbSvc.0x8a0_0" , //send,recv
47
50
GROUP_BAN : "OidbSvc.0x570_8" , //send,recv
48
- GROUP_INVITE : "" ,
51
+ GROUP_INVITE : "OidbSvc.oidb_0x758" , //send,recv
49
52
GROUP_TRANSFER : "" ,
50
53
GROUP_DISMISS : "" ,
51
54
GROUP_ADMIN : "OidbSvc.0x55c_1" , //send,recv
@@ -1145,6 +1148,65 @@ function buildGroupFileUrlRequestPacket(group_id, bus_id, file_id, c) {
1145
1148
1146
1149
//----------------------------------------------------------------------------------------------------
1147
1150
1151
+ function buildAddSettingRequestPacket ( user_id , c ) {
1152
+ const FS = jce . encodeStruct ( [
1153
+ c . uin ,
1154
+ user_id , 3004 , 0 , null , 1
1155
+ ] ) ;
1156
+ const extra = {
1157
+ req_id : c . nextSeq ( ) ,
1158
+ service : "mqq.IMService.FriendListServiceServantObj" ,
1159
+ method : "GetUserAddFriendSettingReq" ,
1160
+ } ;
1161
+ const body = jce . encodeWrapper ( { FS } , extra ) ;
1162
+ return commonUNI ( c , CMD . ADD_SETTING , body , BUF0 ) ;
1163
+ }
1164
+ function buildAddFriendRequestPacket ( type , group_id , user_id , comment , c ) {
1165
+ const AF = jce . encodeStruct ( [
1166
+ c . uin ,
1167
+ user_id , type ?1 :0 , 1 , 0 , type ?15 :0 , comment , 0 , 1 , null , 3004 ,
1168
+ 11 , null , null , pb . encode ( "AddFrdFromGrp" , { groupCode : group_id } ) , 0 , null , null , 0
1169
+ ] ) ;
1170
+ const extra = {
1171
+ req_id : c . nextSeq ( ) ,
1172
+ service : "mqq.IMService.FriendListServiceServantObj" ,
1173
+ method : "AddFriendReq" ,
1174
+ } ;
1175
+ const body = jce . encodeWrapper ( { AF } , extra ) ;
1176
+ return commonUNI ( c , CMD . ADD_FRIEND , body , BUF0 ) ;
1177
+ }
1178
+ function buildDelFriendRequestPacket ( user_id , block , c ) {
1179
+ const DF = jce . encodeStruct ( [
1180
+ c . uin ,
1181
+ user_id , 2 , block ?1 :0
1182
+ ] ) ;
1183
+ const extra = {
1184
+ req_id : c . nextSeq ( ) ,
1185
+ service : "mqq.IMService.FriendListServiceServantObj" ,
1186
+ method : "DelFriendReq" ,
1187
+ } ;
1188
+ const body = jce . encodeWrapper ( { DF } , extra ) ;
1189
+ return commonUNI ( c , CMD . DEL_FRIEND , body , BUF0 ) ;
1190
+ }
1191
+ function buildInviteRequestPacket ( group_id , user_id , c ) {
1192
+ c . nextSeq ( ) ;
1193
+ const body = pb . encode ( "OIDBSSOPkg" , {
1194
+ command : 1880 ,
1195
+ serviceType : 1 ,
1196
+ result : 0 ,
1197
+ bodybuffer : pb . encode ( "D758ReqBody" , {
1198
+ groupCode : group_id ,
1199
+ toUin : {
1200
+ uin : user_id
1201
+ }
1202
+ } ) ,
1203
+ clientVersion : "android 8.2.7"
1204
+ } ) ;
1205
+ return commonUNI ( c , CMD . GROUP_INVITE , body ) ;
1206
+ }
1207
+
1208
+ //----------------------------------------------------------------------------------------------------
1209
+
1148
1210
module . exports = {
1149
1211
1150
1212
CMD ,
@@ -1161,6 +1223,7 @@ module.exports = {
1161
1223
1162
1224
// request
1163
1225
buildGroupRequestRequestPacket, buildFriendRequestRequestPacket, buildNewFriendRequestPacket, buildNewGroupRequestPacket,
1226
+ buildAddSettingRequestPacket, buildAddFriendRequestPacket, buildDelFriendRequestPacket, buildInviteRequestPacket,
1164
1227
1165
1228
// recall leave
1166
1229
buildFriendRecallRequestPacket, buildGroupRecallRequestPacket, buildGroupLeaveRequestPacket,
0 commit comments