1,添加设置群成员昵称api
2,配置当退群或者群踢人时,是否发送visible群通知
This commit is contained in:
@@ -60,7 +60,7 @@ public interface APIPath {
|
||||
String Group_Mute_Member = "/admin/group/manager/mute";
|
||||
String Group_Allow_Member = "/admin/group/manager/allow";
|
||||
String Get_User_Groups = "/admin/group/of_user";
|
||||
|
||||
String Group_Set_Member_Alias = "/admin/group/member/set_alias";
|
||||
|
||||
String Create_Channel = "/admin/channel/create";
|
||||
String Get_System_Setting = "/admin/system/get_setting";
|
||||
|
||||
@@ -105,10 +105,18 @@ public class GroupNotificationBinaryContent {
|
||||
return getGroupNotifyContent(ProtoConstants.MESSAGE_CONTENT_TYPE_KICKOF_GROUP_MEMBER);
|
||||
}
|
||||
|
||||
public WFCMessage.MessageContent getKickokfMemberVisibleGroupNotifyContent() {
|
||||
return getGroupNotifyContent(ProtoConstants.MESSAGE_CONTENT_TYPE_KICKOF_GROUP_MEMBER_VISIBLE);
|
||||
}
|
||||
|
||||
public WFCMessage.MessageContent getQuitGroupNotifyContent() {
|
||||
return getGroupNotifyContent(ProtoConstants.MESSAGE_CONTENT_TYPE_QUIT_GROUP);
|
||||
}
|
||||
|
||||
public WFCMessage.MessageContent getQuitVisibleGroupNotifyContent() {
|
||||
return getGroupNotifyContent(ProtoConstants.MESSAGE_CONTENT_TYPE_QUIT_GROUP_VISIBLE);
|
||||
}
|
||||
|
||||
public WFCMessage.MessageContent getTransferGroupNotifyContent() {
|
||||
return getGroupNotifyContent(ProtoConstants.MESSAGE_CONTENT_TYPE_TRANSFER_GROUP_OWNER);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
/*
|
||||
* This file is part of the Wildfire Chat package.
|
||||
* (c) Heavyrain2012 <[email protected]>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
package cn.wildfirechat.pojos;
|
||||
|
||||
|
||||
import cn.wildfirechat.proto.WFCMessage;
|
||||
import io.netty.util.internal.StringUtil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class InputSetGroupMemberAlias extends InputGroupBase {
|
||||
private String group_id;
|
||||
private String memberId;
|
||||
private String alias;
|
||||
|
||||
public String getGroup_id() {
|
||||
return group_id;
|
||||
}
|
||||
|
||||
public void setGroup_id(String group_id) {
|
||||
this.group_id = group_id;
|
||||
}
|
||||
|
||||
public boolean isValide() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public WFCMessage.ModifyGroupMemberAlias toProtoGroupRequest() {
|
||||
WFCMessage.ModifyGroupMemberAlias.Builder modifyAliasBuilder = WFCMessage.ModifyGroupMemberAlias.newBuilder();
|
||||
modifyAliasBuilder.setGroupId(group_id);
|
||||
modifyAliasBuilder.setAlias(StringUtil.isNullOrEmpty(alias)?"":alias);
|
||||
modifyAliasBuilder.setMemberId(memberId);
|
||||
|
||||
if (to_lines != null) {
|
||||
for (Integer line : to_lines) {
|
||||
modifyAliasBuilder.addToLine(line);
|
||||
}
|
||||
}
|
||||
|
||||
if (notify_message != null) {
|
||||
modifyAliasBuilder.setNotifyContent(notify_message.toProtoMessageContent());
|
||||
}
|
||||
return modifyAliasBuilder.build();
|
||||
}
|
||||
|
||||
public String getMemberId() {
|
||||
return memberId;
|
||||
}
|
||||
|
||||
public void setMemberId(String memberId) {
|
||||
this.memberId = memberId;
|
||||
}
|
||||
|
||||
public String getAlias() {
|
||||
return alias;
|
||||
}
|
||||
|
||||
public void setAlias(String alias) {
|
||||
this.alias = alias;
|
||||
}
|
||||
}
|
||||
@@ -219,5 +219,7 @@ public class ProtoConstants {
|
||||
public static final int MESSAGE_CONTENT_TYPE_SET_MANAGER = 117;
|
||||
public static final int MESSAGE_CONTENT_TYPE_MUTE_MEMBER = 118;
|
||||
public static final int MESSAGE_CONTENT_TYPE_ALLOW_MEMBER = 119;
|
||||
public static final int MESSAGE_CONTENT_TYPE_KICKOF_GROUP_MEMBER_VISIBLE = 120;
|
||||
public static final int MESSAGE_CONTENT_TYPE_QUIT_GROUP_VISIBLE = 121;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user