修正编译错误,优化部分逻辑
This commit is contained in:
@@ -64,6 +64,10 @@ message.max_queue 1024
|
||||
##是否禁止陌生人聊天
|
||||
message.disable_stranger_chat false
|
||||
|
||||
|
||||
##黑名单处理策略,0 发送失败,返回被拉黑的错误码;1 发送成功但消息被服务器直接丢弃;
|
||||
message.blacklist.strategy 0
|
||||
|
||||
##好友请求重复发送的间隔,单位是毫秒,默认是7天,0为不限制
|
||||
friend.repeat_request_duration 604800000
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ abstract public class AdminAction extends Action {
|
||||
Long ts;
|
||||
try {
|
||||
ts = Long.parseLong(timestamp);
|
||||
} catch (NumberFormatException e) {
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return ErrorCode.INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ abstract public class ChannelAction extends Action {
|
||||
Long ts;
|
||||
try {
|
||||
ts = Long.parseLong(timestamp);
|
||||
} catch (NumberFormatException e) {
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return ErrorCode.INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ abstract public class RobotAction extends Action {
|
||||
Long ts;
|
||||
try {
|
||||
ts = Long.parseLong(timestamp);
|
||||
} catch (NumberFormatException e) {
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return ErrorCode.INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
@@ -119,7 +119,7 @@ public final class BrokerConstants {
|
||||
|
||||
public static final String MESSAGE_Disable_Stranger_Chat = "message.disable_stranger_chat";
|
||||
|
||||
public static final String MESSAGE_Blacklist_Strategy = "blacklist.strategy";
|
||||
public static final String MESSAGE_Blacklist_Strategy = "message.blacklist.strategy";
|
||||
public static final String FRIEND_Repeat_Request_Duration = "friend.repeat_request_duration";
|
||||
public static final String FRIEND_Reject_Request_Duration = "friend.reject_request_duration";
|
||||
|
||||
|
||||
@@ -42,8 +42,8 @@ public class SendMessageHandler extends IMHandler<WFCMessage.Message> {
|
||||
}
|
||||
|
||||
try {
|
||||
mBlacklistStrategy = Integer.parseInt(Server.getConfig().getProperty(BrokerConstants.MESSAGE_Blacklist_Strategy));
|
||||
} catch (NumberFormatException e) {
|
||||
mBlacklistStrategy = Integer.parseInt(mServer.getConfig().getProperty(BrokerConstants.MESSAGE_Blacklist_Strategy));
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -137,13 +137,13 @@ public class MemoryMessagesStore implements IMessagesStore {
|
||||
}
|
||||
|
||||
try {
|
||||
mFriendRequestDuration = Long.parseLong(Server.getConfig().getProperty(FRIEND_Repeat_Request_Duration));
|
||||
mFriendRequestDuration = Long.parseLong(m_Server.getConfig().getProperty(FRIEND_Repeat_Request_Duration));
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
try {
|
||||
mFriendRejectDuration = Long.parseLong(Server.getConfig().getProperty(FRIEND_Reject_Request_Duration));
|
||||
mFriendRejectDuration = Long.parseLong(m_Server.getConfig().getProperty(FRIEND_Reject_Request_Duration));
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
@@ -2432,7 +2432,7 @@ public class MemoryMessagesStore implements IMessagesStore {
|
||||
else if(modifyType == Modify_Channel_OnlyCallback) {
|
||||
try {
|
||||
newInfoBuilder.setAutomatic(Integer.parseInt(value));
|
||||
} catch (NumberFormatException e) {
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user