添加开关,确定手机是否默认静音当pc或web在线时
This commit is contained in:
@@ -201,10 +201,15 @@ local.media.storage.root media
|
||||
# local.media.storage.remote_server_url https://example.com/media
|
||||
|
||||
# 是否支持多端登陆,为true时支持任意平台任意多个客户端同时登录;为false时每个平台只支持一个端登录,但不同平台可以同时登录。
|
||||
# Android/iOS为移动平台,windows/mac/linux为pc平台,web为web平台,小程序为小程序平台。
|
||||
server.multi_endpoint false
|
||||
|
||||
# 多平台连接状态通知(仅当multi_endpoint为false时有效),true时移动端可以收到pc或web端登录的通知。
|
||||
server.multi_platform_notification false
|
||||
server.multi_platform_notification true
|
||||
|
||||
# 当pc或者web在线时,手机是否默认静音,默认为false。注意仅影响默认值,用户可以手动切换是否静音。
|
||||
# 如果这里改为true,客户端那边需要同步修改pc在线默认通知状态。
|
||||
server.mobile_default_silent_when_pc_online false
|
||||
|
||||
#*********************************************************************
|
||||
# Push server configuration
|
||||
|
||||
@@ -132,6 +132,7 @@ public final class BrokerConstants {
|
||||
|
||||
public static final String SERVER_MULTI_ENDPOINT = "server.multi_endpoint";
|
||||
public static final String SERVER_MULTI_PLATFROM_NOTIFICATION = "server.multi_platform_notification";
|
||||
public static final String SERVER_MOBILE_DEFAULT_SILENT_WHEN_PC_ONLINE = "server.mobile_default_silent_when_pc_online";
|
||||
|
||||
public static final String MESSAGE_ROAMING = "message.roaming";
|
||||
public static final String MESSAGE_Remote_History_Message = "message.remote_history_message";
|
||||
|
||||
@@ -133,6 +133,7 @@ public class MemoryMessagesStore implements IMessagesStore {
|
||||
private boolean mFriendNewWelcomeMessage = true;
|
||||
|
||||
private boolean mMultiPlatformNotification = false;
|
||||
private boolean mMobileDefaultSilentWhenPCOnline = false;
|
||||
private boolean mDisableStrangerChat = false;
|
||||
|
||||
private long mChatroomParticipantIdleTime = 900000;
|
||||
@@ -183,6 +184,12 @@ public class MemoryMessagesStore implements IMessagesStore {
|
||||
printMissConfigLog(SERVER_MULTI_PLATFROM_NOTIFICATION, mMultiPlatformNotification + "");
|
||||
}
|
||||
|
||||
try {
|
||||
mMobileDefaultSilentWhenPCOnline = Boolean.parseBoolean(m_Server.getConfig().getProperty(SERVER_MOBILE_DEFAULT_SILENT_WHEN_PC_ONLINE, "false"));
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
try {
|
||||
mDisableSearch = Boolean.parseBoolean(m_Server.getConfig().getProperty(BrokerConstants.FRIEND_Disable_Search));
|
||||
} catch (Exception e) {
|
||||
@@ -3400,9 +3407,9 @@ public class MemoryMessagesStore implements IMessagesStore {
|
||||
public boolean getSilentWhenPcOnline(String userId) {
|
||||
WFCMessage.UserSettingEntry entry = getUserSetting(userId, UserSettingScope.kUserSettingMuteWhenPCOnline, null);
|
||||
if (entry != null && "1".equals(entry.getValue())) {
|
||||
return true;
|
||||
return !mMobileDefaultSilentWhenPCOnline;
|
||||
} else {
|
||||
return false;
|
||||
return mMobileDefaultSilentWhenPCOnline;
|
||||
}
|
||||
}
|
||||
private Date getTodayDate() {
|
||||
|
||||
@@ -198,10 +198,15 @@ local.media.storage.root ./media
|
||||
# local.media.storage.remote_server_url https://example.com/media
|
||||
|
||||
# 是否支持多端登陆,为true时支持任意平台任意多个客户端同时登录;为false时每个平台只支持一个端登录,但不同平台可以同时登录。
|
||||
# Android/iOS为移动平台,windows/mac/linux为pc平台,web为web平台,小程序为小程序平台。
|
||||
server.multi_endpoint false
|
||||
|
||||
# 多平台连接状态通知(仅当multi_endpoint为false时有效),true时移动端可以收到pc或web端登录的通知。
|
||||
server.multi_platform_notification false
|
||||
server.multi_platform_notification true
|
||||
|
||||
# 当pc或者web在线时,手机是否默认静音,默认为false。注意仅影响默认值,用户可以手动切换是否静音。
|
||||
# 如果这里改为true,客户端那边需要同步修改pc在线默认通知状态。
|
||||
server.mobile_default_silent_when_pc_online false
|
||||
|
||||
#*********************************************************************
|
||||
# Push server configuration
|
||||
|
||||
Reference in New Issue
Block a user