server api支持修改群组类型

This commit is contained in:
heavyrian2012
2025-05-29 14:18:29 +08:00
parent 731fa00cc9
commit 1d6faa5796
2 changed files with 9 additions and 0 deletions
@@ -1963,6 +1963,14 @@ public class MemoryMessagesStore implements IMessagesStore {
newInfoBuilder.setPrivateChat(Integer.parseInt(value)); newInfoBuilder.setPrivateChat(Integer.parseInt(value));
else if(modifyType == Modify_Group_Searchable) else if(modifyType == Modify_Group_Searchable)
newInfoBuilder.setSearchable(Integer.parseInt(value)); newInfoBuilder.setSearchable(Integer.parseInt(value));
else if(modifyType == Modify_Group_Type) {
int newType = Integer.parseInt(value);
if(newType < 0 || newType > ProtoConstants.GroupType.GroupType_Organization) {
LOG.error("modify group type failure, invalid group type {}", newType);
return ErrorCode.INVALID_PARAMETER;
}
newInfoBuilder.setType(newType);
}
else else
return ErrorCode.INVALID_PARAMETER; return ErrorCode.INVALID_PARAMETER;
@@ -172,6 +172,7 @@ public class ProtoConstants {
int Modify_Group_Max_Member_Count = 8; int Modify_Group_Max_Member_Count = 8;
//仅专业版的server api支持 //仅专业版的server api支持
int Modify_Group_Super_Group = 9; int Modify_Group_Super_Group = 9;
int Modify_Group_Type = 10;
} }
//ModifyGroupInfoRequest -> type //ModifyGroupInfoRequest -> type