From c3859a9fae14216c65d2f5a6b6897ccd7937a457 Mon Sep 17 00:00:00 2001 From: heavyrain2012 Date: Fri, 23 Jul 2021 11:40:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BD=93web/pc=E5=9C=A8=E7=BA=BF=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E6=89=8B=E6=9C=BA=E9=BB=98=E8=AE=A4=E4=B8=8D=E5=8F=91?= =?UTF-8?q?=E5=87=BA=E9=80=9A=E7=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- broker/config/wildfirechat.conf | 6 +++--- .../java/io/moquette/persistence/MemoryMessagesStore.java | 4 ++-- distribution/src/main/resources/wildfirechat.conf | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/broker/config/wildfirechat.conf b/broker/config/wildfirechat.conf index 3b29c511..01a25e64 100755 --- a/broker/config/wildfirechat.conf +++ b/broker/config/wildfirechat.conf @@ -207,9 +207,9 @@ server.multi_endpoint false # 多平台连接状态通知(仅当multi_endpoint为false时有效),true时移动端可以收到pc或web端登录的通知。 server.multi_platform_notification true -# 当pc或者web在线时,手机是否默认静音,默认为false。注意仅影响默认值,用户可以手动切换是否静音。 -# 如果这里改为true,客户端那边需要同步修改pc在线默认通知状态,方法是client的setDefaultSilentWhenPcOnline函数。 -server.mobile_default_silent_when_pc_online false +# 当pc或者web在线时,手机是否默认静音,默认为true。注意仅影响默认值,用户可以手动切换是否静音。 +# 如果这里改为false,客户端那边需要同步修改pc在线默认通知状态,方法是client的setDefaultSilentWhenPcOnline函数。 +server.mobile_default_silent_when_pc_online true #********************************************************************* # Push server configuration diff --git a/broker/src/main/java/io/moquette/persistence/MemoryMessagesStore.java b/broker/src/main/java/io/moquette/persistence/MemoryMessagesStore.java index 36f09c87..9a307931 100755 --- a/broker/src/main/java/io/moquette/persistence/MemoryMessagesStore.java +++ b/broker/src/main/java/io/moquette/persistence/MemoryMessagesStore.java @@ -133,7 +133,7 @@ public class MemoryMessagesStore implements IMessagesStore { private boolean mFriendNewWelcomeMessage = true; private boolean mMultiPlatformNotification = false; - private boolean mMobileDefaultSilentWhenPCOnline = false; + private boolean mMobileDefaultSilentWhenPCOnline = true; private boolean mDisableStrangerChat = false; private long mChatroomParticipantIdleTime = 900000; @@ -185,7 +185,7 @@ public class MemoryMessagesStore implements IMessagesStore { } try { - mMobileDefaultSilentWhenPCOnline = Boolean.parseBoolean(m_Server.getConfig().getProperty(SERVER_MOBILE_DEFAULT_SILENT_WHEN_PC_ONLINE, "false")); + mMobileDefaultSilentWhenPCOnline = Boolean.parseBoolean(m_Server.getConfig().getProperty(SERVER_MOBILE_DEFAULT_SILENT_WHEN_PC_ONLINE, "true")); } catch (Exception e) { e.printStackTrace(); } diff --git a/distribution/src/main/resources/wildfirechat.conf b/distribution/src/main/resources/wildfirechat.conf index 33243907..d21799a6 100755 --- a/distribution/src/main/resources/wildfirechat.conf +++ b/distribution/src/main/resources/wildfirechat.conf @@ -204,9 +204,9 @@ server.multi_endpoint false # 多平台连接状态通知(仅当multi_endpoint为false时有效),true时移动端可以收到pc或web端登录的通知。 server.multi_platform_notification true -# 当pc或者web在线时,手机是否默认静音,默认为false。注意仅影响默认值,用户可以手动切换是否静音。 -# 如果这里改为true,客户端那边需要同步修改pc在线默认通知状态,方法是client的setDefaultSilentWhenPcOnline函数。 -server.mobile_default_silent_when_pc_online false +# 当pc或者web在线时,手机是否默认静音,默认为true。注意仅影响默认值,用户可以手动切换是否静音。 +# 如果这里改为false,客户端那边需要同步修改pc在线默认通知状态,方法是client的setDefaultSilentWhenPcOnline函数。 +server.mobile_default_silent_when_pc_online true #********************************************************************* # Push server configuration