Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bcf969e56f | ||
|
|
b3a95c0310 | ||
|
|
ae863ab6e4 | ||
|
|
688ca4e31d | ||
|
|
724b6dddd6 | ||
|
|
bf3b30eb2c |
+1
-1
@@ -5,7 +5,7 @@
|
|||||||
<relativePath>../</relativePath>
|
<relativePath>../</relativePath>
|
||||||
<artifactId>wildfirechat-parent</artifactId>
|
<artifactId>wildfirechat-parent</artifactId>
|
||||||
<groupId>cn.wildfirechat</groupId>
|
<groupId>cn.wildfirechat</groupId>
|
||||||
<version>0.30</version>
|
<version>0.31</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>moquette-broker</artifactId>
|
<artifactId>moquette-broker</artifactId>
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ public class FriendPullHandler extends IMHandler<WFCMessage.Version> {
|
|||||||
WFCMessage.GetFriendsResult.Builder builder = WFCMessage.GetFriendsResult.newBuilder();
|
WFCMessage.GetFriendsResult.Builder builder = WFCMessage.GetFriendsResult.newBuilder();
|
||||||
for (FriendData data : friendDatas
|
for (FriendData data : friendDatas
|
||||||
) {
|
) {
|
||||||
WFCMessage.Friend.Builder builder1 = WFCMessage.Friend.newBuilder().setState(data.getState()).setUid(data.getFriendUid()).setUpdateDt(data.getTimestamp());
|
WFCMessage.Friend.Builder builder1 = WFCMessage.Friend.newBuilder().setState(data.getState()).setBlacked(data.getBlacked()).setUid(data.getFriendUid()).setUpdateDt(data.getTimestamp());
|
||||||
if (!StringUtil.isNullOrEmpty(data.getAlias())) {
|
if (!StringUtil.isNullOrEmpty(data.getAlias())) {
|
||||||
builder1.setAlias(data.getAlias());
|
builder1.setAlias(data.getAlias());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1562,7 +1562,7 @@ public class MemoryMessagesStore implements IMessagesStore {
|
|||||||
|
|
||||||
for (FriendData friendData : friendDatas) {
|
for (FriendData friendData : friendDatas) {
|
||||||
if (friendData.getFriendUid().equals(userId)) {
|
if (friendData.getFriendUid().equals(userId)) {
|
||||||
if (friendData.getState() == 2) {
|
if (friendData.getBlacked() == 1) {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
@@ -1896,7 +1896,10 @@ public class MemoryMessagesStore implements IMessagesStore {
|
|||||||
public ErrorCode blackUserRequest(String fromUser, String targetUserId, int state, long[] heads) {
|
public ErrorCode blackUserRequest(String fromUser, String targetUserId, int state, long[] heads) {
|
||||||
if (state == 2) {
|
if (state == 2) {
|
||||||
state = 1;
|
state = 1;
|
||||||
|
} else {
|
||||||
|
state = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
HazelcastInstance hzInstance = m_Server.getHazelcastInstance();
|
HazelcastInstance hzInstance = m_Server.getHazelcastInstance();
|
||||||
MultiMap<String, FriendData> friendsMap = hzInstance.getMultiMap(USER_FRIENDS);
|
MultiMap<String, FriendData> friendsMap = hzInstance.getMultiMap(USER_FRIENDS);
|
||||||
|
|
||||||
@@ -2164,7 +2167,7 @@ public class MemoryMessagesStore implements IMessagesStore {
|
|||||||
public boolean getUserPushHiddenDetail(String userId) {
|
public boolean getUserPushHiddenDetail(String userId) {
|
||||||
Boolean hidden = userPushHiddenDetail.get(userId);
|
Boolean hidden = userPushHiddenDetail.get(userId);
|
||||||
if (hidden == null) {
|
if (hidden == null) {
|
||||||
WFCMessage.UserSettingEntry entry = getUserSetting(userId, UserSettingScope.kUserSettingGlobalSilent, null);
|
WFCMessage.UserSettingEntry entry = getUserSetting(userId, UserSettingScope.kUserSettingHiddenNotificationDetail, null);
|
||||||
if (entry == null || !entry.getValue().equals("1")) {
|
if (entry == null || !entry.getValue().equals("1")) {
|
||||||
hidden = false;
|
hidden = false;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -142,7 +142,7 @@ public class ProtocolProcessor {
|
|||||||
String clientId = payload.clientIdentifier();
|
String clientId = payload.clientIdentifier();
|
||||||
LOG.info("Processing CONNECT message. CId={}, username={}", clientId, payload.userName());
|
LOG.info("Processing CONNECT message. CId={}, username={}", clientId, payload.userName());
|
||||||
|
|
||||||
if (msg.variableHeader().version() <= MqttVersion.MQTT_3_1_1.protocolLevel() ||
|
if (msg.variableHeader().version() < MqttVersion.MQTT_3_1_1.protocolLevel() ||
|
||||||
msg.variableHeader().version() >= MqttVersion.Wildfire_Max.protocolLevel()) {
|
msg.variableHeader().version() >= MqttVersion.Wildfire_Max.protocolLevel()) {
|
||||||
MqttConnAckMessage badProto = connAck(CONNECTION_REFUSED_UNACCEPTABLE_PROTOCOL_VERSION);
|
MqttConnAckMessage badProto = connAck(CONNECTION_REFUSED_UNACCEPTABLE_PROTOCOL_VERSION);
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>wildfirechat-parent</artifactId>
|
<artifactId>wildfirechat-parent</artifactId>
|
||||||
<groupId>cn.wildfirechat</groupId>
|
<groupId>cn.wildfirechat</groupId>
|
||||||
<version>0.30</version>
|
<version>0.31</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<!--<relativePath>../pom.xml</relativePath>-->
|
<!--<relativePath>../pom.xml</relativePath>-->
|
||||||
<artifactId>wildfirechat-parent</artifactId>
|
<artifactId>wildfirechat-parent</artifactId>
|
||||||
<groupId>cn.wildfirechat</groupId>
|
<groupId>cn.wildfirechat</groupId>
|
||||||
<version>0.30</version>
|
<version>0.31</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>distribution</artifactId>
|
<artifactId>distribution</artifactId>
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
<artifactId>wildfirechat-parent</artifactId>
|
<artifactId>wildfirechat-parent</artifactId>
|
||||||
|
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<version>0.30</version>
|
<version>0.31</version>
|
||||||
<name>Wildfire Chat</name>
|
<name>Wildfire Chat</name>
|
||||||
<description>Wildfire Chat Server</description>
|
<description>Wildfire Chat Server</description>
|
||||||
<inceptionYear>2019</inceptionYear>
|
<inceptionYear>2019</inceptionYear>
|
||||||
|
|||||||
+1
-1
@@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>wildfirechat-parent</artifactId>
|
<artifactId>wildfirechat-parent</artifactId>
|
||||||
<groupId>cn.wildfirechat</groupId>
|
<groupId>cn.wildfirechat</groupId>
|
||||||
<version>0.30</version>
|
<version>0.31</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -1,27 +0,0 @@
|
|||||||
package cn.wildfirechat.sdk;
|
|
||||||
|
|
||||||
import cn.wildfirechat.common.APIPath;
|
|
||||||
import cn.wildfirechat.pojos.*;
|
|
||||||
import cn.wildfirechat.sdk.model.IMResult;
|
|
||||||
import cn.wildfirechat.sdk.utilities.AdminHttpUtils;
|
|
||||||
|
|
||||||
public class ChannelAdmin {
|
|
||||||
public static IMResult<OutputCreateChatroom> createChannel(InputCreateChatroom input) throws Exception {
|
|
||||||
String path = APIPath.Create_Chatroom;
|
|
||||||
return AdminHttpUtils.httpJsonPost(path, input, OutputCreateChatroom.class);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static IMResult<Void> destroyChannel(String chatroomId) throws Exception {
|
|
||||||
String path = APIPath.Chatroom_Destroy;
|
|
||||||
InputDestoryChatroom input = new InputDestoryChatroom();
|
|
||||||
input.setChatroomId(chatroomId);
|
|
||||||
return AdminHttpUtils.httpJsonPost(path, input, Void.class);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static IMResult<OutputGetChatroomInfo> getChannelInfo(String chatroomId) throws Exception {
|
|
||||||
String path = APIPath.Chatroom_Info;
|
|
||||||
InputGetChatroomInfo input = new InputGetChatroomInfo(chatroomId);
|
|
||||||
return AdminHttpUtils.httpJsonPost(path, input, OutputGetChatroomInfo.class);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user