添加设置用户关系中的附加信息

This commit is contained in:
heavyrain2012
2021-09-01 14:39:59 +08:00
parent 5ce8165514
commit f62e3f3cef
7 changed files with 141 additions and 0 deletions
@@ -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);
}
}
//***********************************************
//**** 群组相关功能