Merge branch 'wildfirechat' of https://github.com/wildfirechat/server into wildfirechat
This commit is contained in:
@@ -201,7 +201,7 @@ public class UploadFileAction extends Action {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (remoteFileSize > 50 * 1024 * 1024) {
|
||||
if (remoteFileSize > 200 * 1024 * 1024) {
|
||||
logger.warn("file over limite!(" + remoteFileSize + ")");
|
||||
response.setStatus(HttpResponseStatus.BAD_REQUEST);
|
||||
response.setContent("file over limite!");
|
||||
|
||||
@@ -44,6 +44,8 @@ public class ModifyGroupInfoHandler extends GroupHandler<WFCMessage.ModifyGroupI
|
||||
content = new GroupNotificationBinaryContent(request.getGroupId(), fromUser, request.getValue(), "").getChangeGroupPrivatechatNotifyContent();
|
||||
} else if(request.getType() == Modify_Group_Searchable) {
|
||||
content = new GroupNotificationBinaryContent(request.getGroupId(), fromUser, request.getValue(), "").getChangeGroupSearchableNotifyContent();
|
||||
} else if(request.getType() == Modify_Group_Extra) {
|
||||
content = new GroupNotificationBinaryContent(request.getGroupId(), fromUser, request.getValue(), "").getChangeGroupExtraNotifyContent();
|
||||
}
|
||||
|
||||
if (content != null) {
|
||||
|
||||
@@ -160,4 +160,9 @@ public class GroupNotificationBinaryContent {
|
||||
public WFCMessage.MessageContent getAllowGroupMemberNotifyContent() {
|
||||
return getGroupNotifyContent(ProtoConstants.MESSAGE_CONTENT_TYPE_ALLOW_MEMBER);
|
||||
}
|
||||
|
||||
public WFCMessage.MessageContent getChangeGroupExtraNotifyContent() {
|
||||
return getGroupNotifyContent(ProtoConstants.MESSAGE_CONTENT_TYPE_MODIFY_GROUP_EXTRA);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -49,11 +49,21 @@ public class InputModifyGroupInfo extends InputGroupBase {
|
||||
}
|
||||
|
||||
public WFCMessage.ModifyGroupInfoRequest toProtoGroupRequest() {
|
||||
return WFCMessage.ModifyGroupInfoRequest.newBuilder()
|
||||
.setGroupId(group_id)
|
||||
.setType(type)
|
||||
.setValue(value)
|
||||
.addAllToLine(to_lines == null || to_lines.isEmpty() ? Arrays.asList(0) : to_lines)
|
||||
.build();
|
||||
if(notify_message != null && notify_message.getType() > 0) {
|
||||
return WFCMessage.ModifyGroupInfoRequest.newBuilder()
|
||||
.setGroupId(group_id)
|
||||
.setType(type)
|
||||
.setValue(value)
|
||||
.addAllToLine(to_lines == null || to_lines.isEmpty() ? Arrays.asList(0) : to_lines)
|
||||
.build();
|
||||
} else {
|
||||
return WFCMessage.ModifyGroupInfoRequest.newBuilder()
|
||||
.setGroupId(group_id)
|
||||
.setType(type)
|
||||
.setValue(value)
|
||||
.addAllToLine(to_lines == null || to_lines.isEmpty() ? Arrays.asList(0) : to_lines)
|
||||
.setNotifyContent(notify_message.toProtoMessageContent())
|
||||
.build();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -234,5 +234,7 @@ public class ProtoConstants {
|
||||
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;
|
||||
|
||||
public static final int MESSAGE_CONTENT_TYPE_MODIFY_GROUP_EXTRA = 122;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user