【m】增加请求理由
This commit is contained in:
@@ -41,6 +41,7 @@ function showCallRequestDialog(caller = {}) {
|
||||
const callerName = caller.name || '邀请方';
|
||||
const callerAvatar = caller.avatar || '/images/p2.png';
|
||||
const targetConnectionId = caller.connectionId || '';
|
||||
const applyReason = caller.applyReason || caller.reason || '未填写';
|
||||
pendingIncomingInvite = caller;
|
||||
|
||||
if (document.getElementById('callRequestName')) {
|
||||
@@ -54,6 +55,9 @@ function showCallRequestDialog(caller = {}) {
|
||||
? `正在邀请您加入通话 (${targetConnectionId})`
|
||||
: '正在请求与您进行视频通话';
|
||||
}
|
||||
if (document.getElementById('callRequestReason')) {
|
||||
document.getElementById('callRequestReason').textContent = applyReason;
|
||||
}
|
||||
|
||||
if (targetConnectionId) {
|
||||
connectionId = targetConnectionId;
|
||||
@@ -92,7 +96,8 @@ function bindInviteSignalHandlers() {
|
||||
inviterSocketId: payload.inviterSocketId,
|
||||
inviterUserId: payload.inviterUserId,
|
||||
name: payload.inviterName || '邀请方',
|
||||
avatar: payload.inviterAvatar || '/images/p2.png'
|
||||
avatar: payload.inviterAvatar || '/images/p2.png',
|
||||
applyReason: payload.applyReason || payload.reason || ''
|
||||
};
|
||||
showCallRequestDialog(pendingIncomingInvite);
|
||||
showNotification(`${pendingIncomingInvite.name} 邀请你加入通话`);
|
||||
|
||||
Reference in New Issue
Block a user