添加设置用户关系中的附加信息
This commit is contained in:
@@ -381,6 +381,15 @@ public class Main {
|
||||
System.exit(-1);
|
||||
}
|
||||
|
||||
String friendExtra = "hello friend extra";
|
||||
IMResult<Void> setExtraResult = RelationAdmin.updateFriendExtra("ff1", "ff2", friendExtra);
|
||||
if (setExtraResult != null && setExtraResult.getErrorCode() == ErrorCode.ERROR_CODE_SUCCESS) {
|
||||
System.out.println("set friend extra success");
|
||||
} else {
|
||||
System.out.println("set friend extra failure");
|
||||
System.exit(-1);
|
||||
}
|
||||
|
||||
IMResult<RelationPojo> getRelation = RelationAdmin.getRelation("ff1", "ff2");
|
||||
if (getRelation != null && getRelation.getErrorCode() == ErrorCode.ERROR_CODE_SUCCESS) {
|
||||
System.out.println("get friend relation success");
|
||||
@@ -388,6 +397,11 @@ public class Main {
|
||||
System.out.println("get friend relation failure");
|
||||
System.exit(-1);
|
||||
}
|
||||
|
||||
if(!friendExtra.equals(getRelation.getResult().extra)) {
|
||||
System.out.println("set friend extra failure");
|
||||
System.exit(-1);
|
||||
}
|
||||
}
|
||||
//***********************************************
|
||||
//**** 群组相关功能
|
||||
|
||||
Reference in New Issue
Block a user