[mirotalksfu] - #148 add chatGPT in chat config section
هذا الالتزام موجود في:
@@ -43,6 +43,27 @@ module.exports = class Room {
|
|||||||
this.createTheRouter();
|
this.createTheRouter();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ####################################################
|
||||||
|
// ROOM INFO
|
||||||
|
// ####################################################
|
||||||
|
|
||||||
|
toJson() {
|
||||||
|
return {
|
||||||
|
id: this.id,
|
||||||
|
broadcasting: this._isBroadcasting,
|
||||||
|
recSyncServerRecording: this._recSyncServerRecording,
|
||||||
|
config: {
|
||||||
|
isLocked: this._isLocked,
|
||||||
|
isLobbyEnabled: this._isLobbyEnabled,
|
||||||
|
hostOnlyRecording: this._hostOnlyRecording,
|
||||||
|
},
|
||||||
|
moderator: this._moderator,
|
||||||
|
survey: this.survey,
|
||||||
|
redirect: this.redirect,
|
||||||
|
peers: JSON.stringify([...this.peers]),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
// ####################################################
|
// ####################################################
|
||||||
// ROUTER
|
// ROUTER
|
||||||
// ####################################################
|
// ####################################################
|
||||||
@@ -163,27 +184,6 @@ module.exports = class Room {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ####################################################
|
|
||||||
// ROOM INFO
|
|
||||||
// ####################################################
|
|
||||||
|
|
||||||
toJson() {
|
|
||||||
return {
|
|
||||||
id: this.id,
|
|
||||||
broadcasting: this._isBroadcasting,
|
|
||||||
recSyncServerRecording: this._recSyncServerRecording,
|
|
||||||
config: {
|
|
||||||
isLocked: this._isLocked,
|
|
||||||
isLobbyEnabled: this._isLobbyEnabled,
|
|
||||||
hostOnlyRecording: this._hostOnlyRecording,
|
|
||||||
},
|
|
||||||
moderator: this._moderator,
|
|
||||||
survey: this.survey,
|
|
||||||
redirect: this.redirect,
|
|
||||||
peers: JSON.stringify([...this.peers]),
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
// ####################################################
|
// ####################################################
|
||||||
// PEERS
|
// PEERS
|
||||||
// ####################################################
|
// ####################################################
|
||||||
|
|||||||
@@ -181,6 +181,7 @@ module.exports = {
|
|||||||
chatEmojiButton: true,
|
chatEmojiButton: true,
|
||||||
chatMarkdownButton: true,
|
chatMarkdownButton: true,
|
||||||
chatSpeechStartButton: true,
|
chatSpeechStartButton: true,
|
||||||
|
chatGPT: true,
|
||||||
},
|
},
|
||||||
participantsList: {
|
participantsList: {
|
||||||
saveInfoButton: true, // presenter
|
saveInfoButton: true, // presenter
|
||||||
|
|||||||
@@ -3390,25 +3390,30 @@ async function getRoomParticipants() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getParticipantsList(peers) {
|
function getParticipantsList(peers) {
|
||||||
|
let li = '';
|
||||||
|
|
||||||
|
const chatGPT = BUTTONS.chat.chatGPT !== undefined ? BUTTONS.chat.chatGPT : true;
|
||||||
|
|
||||||
// CHAT-GPT
|
// CHAT-GPT
|
||||||
let li = `
|
if (chatGPT) {
|
||||||
<li
|
li = `
|
||||||
id="ChatGPT"
|
<li
|
||||||
data-to-id="ChatGPT"
|
id="ChatGPT"
|
||||||
data-to-name="ChatGPT"
|
data-to-id="ChatGPT"
|
||||||
class="clearfix"
|
data-to-name="ChatGPT"
|
||||||
onclick="rc.showPeerAboutAndMessages(this.id, 'ChatGPT', event)"
|
class="clearfix"
|
||||||
>
|
onclick="rc.showPeerAboutAndMessages(this.id, 'ChatGPT', event)"
|
||||||
<img
|
>
|
||||||
src="${image.chatgpt}"
|
<img
|
||||||
alt="avatar"
|
src="${image.chatgpt}"
|
||||||
/>
|
alt="avatar"
|
||||||
<div class="about">
|
/>
|
||||||
<div class="name">ChatGPT</div>
|
<div class="about">
|
||||||
<div class="status"><i class="fa fa-circle online"></i> online</div>
|
<div class="name">ChatGPT</div>
|
||||||
</div>
|
<div class="status"><i class="fa fa-circle online"></i> online</div>
|
||||||
</li>
|
</div>
|
||||||
`;
|
</li>`;
|
||||||
|
}
|
||||||
|
|
||||||
// ALL
|
// ALL
|
||||||
li += `
|
li += `
|
||||||
|
|||||||
@@ -81,6 +81,7 @@ let BUTTONS = {
|
|||||||
chatEmojiButton: true,
|
chatEmojiButton: true,
|
||||||
chatMarkdownButton: true,
|
chatMarkdownButton: true,
|
||||||
chatSpeechStartButton: true,
|
chatSpeechStartButton: true,
|
||||||
|
chatGPT: true,
|
||||||
},
|
},
|
||||||
participantsList: {
|
participantsList: {
|
||||||
saveInfoButton: true, // presenter
|
saveInfoButton: true, // presenter
|
||||||
|
|||||||
المرجع في مشكلة جديدة
حظر مستخدم