Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IM-sdk的API获取的用户信息无法判断是否已注销 #727

Open
bumblebee1024 opened this issue Jan 23, 2025 · 3 comments
Open

IM-sdk的API获取的用户信息无法判断是否已注销 #727

bumblebee1024 opened this issue Jan 23, 2025 · 3 comments

Comments

@bumblebee1024
Copy link

目前使用的SDK版本1.3.2,UserAdmin.getUserByUserId 这个API获取到的用户对象无法判断是否已经注销。
并且,UserAdmin.destroyUser这个API 能够对已经注销的用户重复执行。

@heavyrain2012
Copy link
Contributor

使用server api获取用户信息,如果用户已经删除,那么应该会返回不存在的错误码,只有存在才会返回。这个修改是2022.11.9添加上去的。请确认你们的IM服务版本是这个时间之前还是之后的

@bumblebee1024
Copy link
Author

/api/version如下,是在这个版本用UserAdmin.destroyUser后再UserAdmin.getUserByUserId ,还是能获取到

{
"tags":"null",
"branch":"ebde9af72b61eae1d24ac49cdea32b5f219726a8",
"dirty":"null",
"remoteOriginUrl":"[email protected]:heavyrain2012/server_commercial.git",
"commitId":"ebde9af72b61eae1d24ac49cdea32b5f219726a8",
"commitIdAbbrev":"ebde9af",
"describe":"llld-240-gebde9af-dirty",
"describeShort":"null",
"commitUserName":"heavyrian2012",
"commitUserEmail":"[email protected]",
"commitMessageFull":"解决roaming关闭时超级群组同步消息问题\n",
"commitMessageShort":"解决roaming关闭时超级群组同步消息问题",
"commitTime":"20241128193109",
"label":"ca90cc6a-e30b-43d5-b9d9-a9febf43bc69",
"nodeIds":"1 2 ",
"closestTagName":"null",
"closestTagCommitCount":"null",
"buildUserName":"Unknown",
"buildUserEmail":"Unknown",
"buildTime":"20241202143819",
"buildHost":"null",
"buildVersion":"null",
"verified":true,
"currentNode":1,
"runTime":57010
}

@heavyrain2012
Copy link
Contributor

我这边测试都是正常的,先创建一个用户,等几秒再销毁,再等几秒,再调用获取用户的接口,能够返回用户不存在的错误码。有可能是线上这个用户数据太大,代码是先删除数据再删除用户信息(标记删除),异步删除用户数据耗时太长,多等一段时间看看好没有好。或者在你们测试环境验证一下

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants