mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-17 22:07:10 +00:00
fix: try to fix #732
This commit is contained in:
parent
5f2b88851f
commit
11fb6f5281
1 changed files with 40 additions and 36 deletions
|
|
@ -399,7 +399,7 @@ export async function createServer () {
|
||||||
quotable: {
|
quotable: {
|
||||||
user_id: _Bot.uin,
|
user_id: _Bot.uin,
|
||||||
user_name: _Bot.nickname
|
user_name: _Bot.nickname
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
await connection.socket.send(JSON.stringify(messageData))
|
await connection.socket.send(JSON.stringify(messageData))
|
||||||
}
|
}
|
||||||
|
|
@ -412,12 +412,12 @@ export async function createServer () {
|
||||||
user_id: item,
|
user_id: item,
|
||||||
nickname: friend.nickname,
|
nickname: friend.nickname,
|
||||||
group: {
|
group: {
|
||||||
isGroup: false,
|
isGroup: false
|
||||||
},
|
},
|
||||||
quotable: {
|
quotable: {
|
||||||
user_id: _Bot.uin,
|
user_id: _Bot.uin,
|
||||||
user_name: _Bot.nickname
|
user_name: _Bot.nickname
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
await connection.socket.send(JSON.stringify(messageData))
|
await connection.socket.send(JSON.stringify(messageData))
|
||||||
})
|
})
|
||||||
|
|
@ -443,6 +443,7 @@ export async function createServer () {
|
||||||
return request
|
return request
|
||||||
}
|
}
|
||||||
Bot.on('message', e => {
|
Bot.on('message', e => {
|
||||||
|
try {
|
||||||
e.message = e.message.map(item => {
|
e.message = e.message.map(item => {
|
||||||
if (item.type === 'at') {
|
if (item.type === 'at') {
|
||||||
let user
|
let user
|
||||||
|
|
@ -481,6 +482,9 @@ export async function createServer () {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} catch (error) {
|
||||||
|
logger.debug(error)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
server.get('/ws', {
|
server.get('/ws', {
|
||||||
websocket: true
|
websocket: true
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue