|
|
@ -898,6 +898,10 @@ |
|
|
}) |
|
|
}) |
|
|
ieSocket.onMessage((msg) => { |
|
|
ieSocket.onMessage((msg) => { |
|
|
if (String(msg.roomId) !== String(this.roomId)) return |
|
|
if (String(msg.roomId) !== String(this.roomId)) return |
|
|
|
|
|
if (msg.type === 'blockStatus') { |
|
|
|
|
|
this.applyBlockStatusEvent(msg) |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
if (this.messages.some(item => String(item.messageId) === String(msg.messageId))) return |
|
|
if (this.messages.some(item => String(item.messageId) === String(msg.messageId))) return |
|
|
if (msg.clientMsgId && this.messages.some(item => item.clientMsgId === msg.clientMsgId)) { |
|
|
if (msg.clientMsgId && this.messages.some(item => item.clientMsgId === msg.clientMsgId)) { |
|
|
this.applyAck(msg) |
|
|
this.applyAck(msg) |
|
|
@ -932,6 +936,26 @@ |
|
|
ieSocket.subscribeRoom(this.roomId) |
|
|
ieSocket.subscribeRoom(this.roomId) |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
applyBlockStatusEvent(msg) { |
|
|
|
|
|
const selfId = String(uni.getStorageSync('id') || '') |
|
|
|
|
|
const targetId = String(this.targetUserId || '') |
|
|
|
|
|
const userId = String(msg.userId || '') |
|
|
|
|
|
const eventTargetId = String(msg.targetUserId || '') |
|
|
|
|
|
const status = userId === selfId ? msg.userStatus : (eventTargetId === selfId ? msg.targetStatus : null) |
|
|
|
|
|
if (status) { |
|
|
|
|
|
this.blockedByMe = !!status.blockedByMe |
|
|
|
|
|
this.blockedByOther = !!status.blockedByOther |
|
|
|
|
|
this.isBlocked = !!status.blocked |
|
|
|
|
|
if (this.isBlocked) { |
|
|
|
|
|
this.showEmoji = false |
|
|
|
|
|
this.voiceMode = false |
|
|
|
|
|
} |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
if (userId === targetId || eventTargetId === targetId) { |
|
|
|
|
|
this.loadBlockStatus() |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
back() { |
|
|
back() { |
|
|
uni.redirectTo({ url: '/package1/ieBrowser/index' }) |
|
|
uni.redirectTo({ url: '/package1/ieBrowser/index' }) |
|
|
} |
|
|
} |
|
|
|