调整im 登陆

This commit is contained in:
2025-09-08 16:02:46 +08:00
parent b79073b295
commit 0aa3069efe
3 changed files with 8 additions and 2 deletions

View File

@@ -109,8 +109,9 @@ object AppState {
OpenIMManager.initSDK(context, initConfig)
try {
val sign = accountService.getMyTrtcSign()
loginToOpenIM(sign.userId, sign.sig)
if (profile?.chatToken != null && profile?.trtcUserId != null) {
loginToOpenIM(profile!!.trtcUserId, profile!!.chatToken!!)
}
context.startService(Intent(context, OpenIMService::class.java))