mute notification when pc online settings

This commit is contained in:
imhao183
2020-10-05 17:24:18 +08:00
parent 0a5c8a67bb
commit ef1f25dab1
5 changed files with 38 additions and 1 deletions
@@ -1051,6 +1051,10 @@ public class DatabaseStore {
out.add(builder.build());
}
if (out.isEmpty()) {
WFCMessage.UserSettingEntry.Builder builder = WFCMessage.UserSettingEntry.newBuilder().setScope(999).setKey("").setValue("").setUpdateDt(0);
out.add(builder.build());
}
return out;
} catch (SQLException e) {
// TODO Auto-generated catch block
@@ -2743,6 +2743,16 @@ public class MemoryMessagesStore implements IMessagesStore {
return slient;
}
@Override
public boolean getSilentWhenPcOnline(String userId) {
WFCMessage.UserSettingEntry entry = getUserSetting(userId, UserSettingScope.kUserSettingMuteWhenPCOnline, null);
if (entry == null || !entry.getValue().equals("0")) {
return false;
} else {
return true;
}
}
@Override
public ErrorCode createChannel(String operator, WFCMessage.ChannelInfo channelInfo) {
HazelcastInstance hzInstance = m_Server.getHazelcastInstance();