diff --git a/common/src/main/java/com/yunbao/common/manager/IMLoginManager.java b/common/src/main/java/com/yunbao/common/manager/IMLoginManager.java index 27c88697d..4f2dd9a64 100644 --- a/common/src/main/java/com/yunbao/common/manager/IMLoginManager.java +++ b/common/src/main/java/com/yunbao/common/manager/IMLoginManager.java @@ -18,6 +18,9 @@ import com.yunbao.common.utils.SpUtil; import org.greenrobot.eventbus.EventBus; +import io.rong.imkit.IMCenter; +import io.rong.imlib.model.Conversation; + /** * 登录者信息管理 */ @@ -183,8 +186,11 @@ public class IMLoginManager extends BaseCacheManager { //用户对象置空 userInfo = null; manager = null; + //删除私聊对话 + IMCenter.getInstance().clearConversations(null, Conversation.ConversationType.PRIVATE); RongcloudIMManager.logoutIM(); MessageIMManager.get(context).logout(); + } /**