添加推送过期配置

This commit is contained in:
heavyrian2012
2023-09-13 11:16:54 +08:00
parent a183d30f89
commit 4e6188ee32
6 changed files with 24 additions and 1 deletions
@@ -145,6 +145,8 @@ public class MemoryMessagesStore implements IMessagesStore {
private long mFriendRequestExpiration = 7 * 24 * 60 * 60 * 1000;
private boolean mFriendRobotAutoAccept = true;
private long mPushExpiredTimes = 604800000L;
private boolean mMultiPlatformNotification = false;
private boolean mMobileDefaultSilentWhenPCOnline = true;
private boolean mDisableStrangerChat = false;
@@ -306,6 +308,12 @@ public class MemoryMessagesStore implements IMessagesStore {
} catch (Exception e) {
}
try {
mPushExpiredTimes = Long.parseLong(m_Server.getConfig().getProperty(BrokerConstants.MESSAGE_Push_Expired_Days, "7")) * 86400000L;
if(mPushExpiredTimes == 0) mPushExpiredTimes = Long.MAX_VALUE;
} catch (Exception e) {
}
try {
mChatroomRejoinWhenActive = Boolean.parseBoolean(m_Server.getConfig().getProperty(BrokerConstants.CHATROOM_Rejoin_When_Active));
} catch (Exception e) {
@@ -4329,6 +4337,11 @@ public class MemoryMessagesStore implements IMessagesStore {
return mFriendRobotAutoAccept;
}
@Override
public long getPushExpiredTimes() {
return mPushExpiredTimes;
}
@Override
public List<Integer> getClientForbiddenSendTypes() {
return mForbiddenClientSendTypes;