mirror of
https://github.com/LLOneBot/LLOneBot.git
synced 2024-11-22 01:56:33 +00:00
fix: add version to ua
This commit is contained in:
parent
b658d164f9
commit
97d7996a50
@ -10,6 +10,7 @@ import { WebSocket as WebSocketClass } from 'ws'
|
|||||||
import { OB11HeartbeatEvent } from '../../event/meta/OB11HeartbeatEvent'
|
import { OB11HeartbeatEvent } from '../../event/meta/OB11HeartbeatEvent'
|
||||||
import { log } from '../../../common/utils/log'
|
import { log } from '../../../common/utils/log'
|
||||||
import { getConfigUtil } from '../../../common/config'
|
import { getConfigUtil } from '../../../common/config'
|
||||||
|
import { version } from '../../../version'
|
||||||
|
|
||||||
export let rwsList: ReverseWebsocket[] = []
|
export let rwsList: ReverseWebsocket[] = []
|
||||||
|
|
||||||
@ -85,7 +86,7 @@ export class ReverseWebsocket {
|
|||||||
'X-Self-ID': selfInfo.uin,
|
'X-Self-ID': selfInfo.uin,
|
||||||
Authorization: `Bearer ${token}`,
|
Authorization: `Bearer ${token}`,
|
||||||
'x-client-role': 'Universal', // koishi-adapter-onebot 需要这个字段
|
'x-client-role': 'Universal', // koishi-adapter-onebot 需要这个字段
|
||||||
'User-Agent': 'LLOneBot',
|
'User-Agent': `LLOneBot/${version}`,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
registerWsEventSender(this.websocket)
|
registerWsEventSender(this.websocket)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user