refactor(im): 对齐文赫电竞消息系统(配对群ID+稳定监听)
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
import GoEasy from '../static/lib/goeasy-2.13.24.esm.min';
|
||||
import { jianquanxian } from './imAuth/jianquanxian';
|
||||
import { parseOrderCardText } from './group-chat.js';
|
||||
import { persistGroupMeta, getFreshImUser, getImUserIdForRole } from './im-user.js';
|
||||
import { persistGroupMeta, getFreshImUser, getImUserIdForRole, getLocalImUserId, getLocalImIdentity } from './im-user.js';
|
||||
|
||||
let _globalPrivateHandler = null;
|
||||
let _globalGroupHandler = null;
|
||||
@@ -82,9 +82,11 @@ function getCurrentGoEasyUserId() {
|
||||
}
|
||||
|
||||
function getExpectedImUserId(app) {
|
||||
const fromLocal = getLocalImUserId(app);
|
||||
if (fromLocal) return fromLocal;
|
||||
const uid = wx.getStorageSync('uid');
|
||||
if (!uid) return '';
|
||||
const role = app.globalData.currentRole || 'normal';
|
||||
const role = app.globalData.currentRole || getLocalImIdentity(app) || 'normal';
|
||||
return getImUserIdForRole(role, uid);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user