mirror of
https://github.com/tl-open-source/tl-rtc-file.git
synced 2025-10-10 18:00:05 +08:00
feat: 支持绘画同步
feat: 支持敏感词检测 feat: 支持多语言版本 feat: 支持回车发送消息 feat: 支持展示房主,语言版本 feat: 支持分享链接带上语言版本 feat: 支持设置公共聊天频道消息展示条数 feat: 支持固定/临时turn账号切换 feat: 支持一键启动脚本 feat: 支持浏览器控制台打印logo feat: 调整优化svg, icon图标 feat: 调整优化弹窗动画 feat: 调整优化媒体流时间动画 feat: 调整优化oss逻辑 feat: 调整优化报错告警信息
This commit is contained in:
@@ -4,7 +4,7 @@ const rtcCommData = require("../rtcCommData/commData");
|
||||
const utils = require("../../utils/utils");
|
||||
const rtcConstant = require("../rtcConstant");
|
||||
const rtcClientEvent = rtcConstant.rtcClientEvent
|
||||
|
||||
const check = require("../../utils/check/content");
|
||||
/**
|
||||
* 公共聊天频道
|
||||
* @param {*} io socketio对象
|
||||
@@ -16,6 +16,8 @@ const rtcClientEvent = rtcConstant.rtcClientEvent
|
||||
*/
|
||||
async function chatingComm(io, socket, tables, dbClient, data){
|
||||
try {
|
||||
data.msg = check.contentFilter(data.msg);
|
||||
|
||||
let cacheSwitchData = rtcCommData.getCacheSwitchData()
|
||||
let chatingComm = rtcCommData.getChatingComm()
|
||||
|
||||
@@ -30,7 +32,7 @@ async function chatingComm(io, socket, tables, dbClient, data){
|
||||
|
||||
data.time = new Date().toLocaleString()
|
||||
|
||||
if (chatingComm.length < 10) {
|
||||
if (chatingComm.length < (cacheSwitchData.chatingCommCount || 10)) {
|
||||
chatingComm.push(data)
|
||||
} else {
|
||||
chatingComm.shift()
|
||||
@@ -48,7 +50,7 @@ async function chatingComm(io, socket, tables, dbClient, data){
|
||||
socketId: data.socketId,
|
||||
device: userAgent,
|
||||
flag: 0,
|
||||
content: decodeURIComponent(data.msg),
|
||||
content: utils.unescapeStr(data.msg),
|
||||
handshake: JSON.stringify(handshake),
|
||||
ip: ip
|
||||
}, tables, dbClient);
|
||||
@@ -59,7 +61,7 @@ async function chatingComm(io, socket, tables, dbClient, data){
|
||||
recoderId: recoderId,
|
||||
msgRecoderId: recoderId,
|
||||
socketId: data.socketId,
|
||||
msg: decodeURIComponent(data.msg),
|
||||
msg: utils.unescapeStr(data.msg),
|
||||
userAgent: userAgent,
|
||||
ip: ip
|
||||
})
|
||||
@@ -72,6 +74,7 @@ async function chatingComm(io, socket, tables, dbClient, data){
|
||||
});
|
||||
bussinessNotify.sendSystemErrorMsg({
|
||||
title: "socket-chatingComm",
|
||||
data: JSON.stringify(data),
|
||||
room: data.room,
|
||||
from : socket.id,
|
||||
msg : JSON.stringify({
|
||||
|
Reference in New Issue
Block a user