api的完善
This commit is contained in:
+1
@@ -0,0 +1 @@
|
||||
update t_channel set `_status` = 64 where `_status` = 3;
|
||||
@@ -0,0 +1 @@
|
||||
update t_channel set `_status` = 64 where `_status` = 3;
|
||||
@@ -50,8 +50,7 @@ import java.util.concurrent.locks.ReadWriteLock;
|
||||
import java.util.concurrent.locks.ReentrantReadWriteLock;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
|
||||
import static cn.wildfirechat.proto.ProtoConstants.ChannelStatus.Channel_Status_Destoryed;
|
||||
import static cn.wildfirechat.proto.ProtoConstants.ChannelState.Channel_State_Mask_Deleted;
|
||||
import static cn.wildfirechat.proto.ProtoConstants.GroupMemberType.*;
|
||||
import static cn.wildfirechat.proto.ProtoConstants.ModifyChannelInfoType.*;
|
||||
import static cn.wildfirechat.proto.ProtoConstants.ModifyGroupInfoType.*;
|
||||
@@ -2617,7 +2616,7 @@ public class MemoryMessagesStore implements IMessagesStore {
|
||||
|
||||
WFCMessage.ChannelInfo.Builder newInfoBuilder = oldInfo.toBuilder();
|
||||
|
||||
newInfoBuilder.setStatus(Channel_Status_Destoryed);
|
||||
newInfoBuilder.setStatus(oldInfo.getStatus() | Channel_State_Mask_Deleted);
|
||||
newInfoBuilder.setUpdateDt(System.currentTimeMillis());
|
||||
mIMap.put(channelId, newInfoBuilder.build());
|
||||
return ErrorCode.ERROR_CODE_SUCCESS;
|
||||
|
||||
@@ -114,10 +114,19 @@ public class ProtoConstants {
|
||||
}
|
||||
|
||||
//Channel -> status
|
||||
public interface ChannelStatus {
|
||||
int Channel_Status_Public = 0;
|
||||
int Channel_Status_Private = 1;
|
||||
int Channel_Status_Destoryed = 2;
|
||||
//第0位表示是否允许查看用户所有信息,还是只允许看用户id,用户名称,用户昵称和用户头像
|
||||
//第1位表示是否允许查看非订阅用户信息
|
||||
//第2位表示是否允许主动添加用户订阅关系
|
||||
//第3位表示是否允许给非订阅用户发送消息
|
||||
//第4位表示是否私有
|
||||
//第6位表示是否删除
|
||||
public interface ChannelState {
|
||||
int Channel_State_Mask_FullInfo = 0x01;
|
||||
int Channel_State_Mask_Unsubscribed_User_Access = 0x02;
|
||||
int Channel_State_Mask_Active_Subscribe = 0x04;
|
||||
int Channel_State_Mask_Message_Unsubscribed = 0x08;
|
||||
int Channel_State_Mask_Private = 0x10;
|
||||
int Channel_State_Mask_Deleted = 0x40;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ http.admin.secret_key 123456
|
||||
|
||||
##服务器API接口参数是否检查时间。当设置为false时,所有的请求会检查时间的有效性;当设置为true时,可以在http.admin.secret_key保持不变的情况下,使用固定的服务API签名
|
||||
##nonce = "76616", timestamp = "1558350862502", sign = "b98f9b0717f59febccf1440067a7f50d9b31bdde"
|
||||
http.admin.no_check_time true
|
||||
http.admin.no_check_time false
|
||||
|
||||
##客户端协议栈密钥,需要与客户端协议栈文件libemqq.cc文件中的aes_key值保持一致,16进制byte用逗号分割。这个密钥对安全性帮助不大,客户不要修改
|
||||
client.proto.secret_key 0x00,0x11,0x22,0x33,0x44,0x55,0x66,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F
|
||||
|
||||
@@ -24,6 +24,18 @@ public class ChannelServiceApi {
|
||||
return httpUtils.httpJsonPost(path, getUserInfo, InputOutputUserInfo.class);
|
||||
}
|
||||
|
||||
public IMResult<InputOutputUserInfo> getUserInfoByName(String userName) throws Exception {
|
||||
String path = APIPath.Channel_User_Info;
|
||||
InputGetUserInfo getUserInfo = new InputGetUserInfo(null, userName, null);
|
||||
return httpUtils.httpJsonPost(path, getUserInfo, InputOutputUserInfo.class);
|
||||
}
|
||||
|
||||
public IMResult<InputOutputUserInfo> getUserInfoByMobile(String mobile) throws Exception {
|
||||
String path = APIPath.Channel_User_Info;
|
||||
InputGetUserInfo getUserInfo = new InputGetUserInfo(null, null, mobile);
|
||||
return httpUtils.httpJsonPost(path, getUserInfo, InputOutputUserInfo.class);
|
||||
}
|
||||
|
||||
public IMResult<Void> modifyChannelInfo(/*ProtoConstants.ModifyChannelInfoType*/int type, String value) throws Exception {
|
||||
String path = APIPath.Channel_Update_Profile;
|
||||
InputModifyChannelInfo modifyChannelInfo = new InputModifyChannelInfo();
|
||||
|
||||
Reference in New Issue
Block a user