This commit is contained in:
idranme
2024-08-28 15:40:08 +08:00
parent 2491de9af8
commit da75f59d0d
17 changed files with 1640 additions and 1641 deletions

View File

@@ -16,9 +16,9 @@ export enum ProfileBizType {
}
export interface NodeIKernelProfileService {
getUidByUin(callfrom: string, uin: Array<string>): Promise<Map<string,string>>//uin->uid
getUidByUin(callfrom: string, uin: Array<string>): Promise<Map<string, string>>//uin->uid
getUinByUid(callfrom: string, uid: Array<string>): Promise<Map<string,string>>
getUinByUid(callfrom: string, uid: Array<string>): Promise<Map<string, string>>
// {
// coreInfo: CoreInfo,

View File

@@ -13,7 +13,6 @@ import {
import { OB11GroupRequestEvent } from './event/request/OB11GroupRequest'
import { OB11FriendRequestEvent } from './event/request/OB11FriendRequest'
import { MessageUnique } from '../common/utils/messageUnique'
import { getConfigUtil } from '../common/config'
import { GroupDecreaseSubType, OB11GroupDecreaseEvent } from './event/notice/OB11GroupDecreaseEvent'
import { selfInfo } from '../common/globalVars'
import { OB11Config, Config as LLOBConfig } from '../common/types'
@@ -74,7 +73,7 @@ class OneBot11Adapter extends Service {
/** 缓存近期消息内容 */
public async addMsgCache(msg: RawMessage) {
const expire = getConfigUtil().getConfig().msgCacheExpire! * 1000
const expire = this.config.msgCacheExpire * 1000
if (expire === 0) {
return
}

View File

@@ -285,13 +285,13 @@ class OB11WebSocketReverseManager {
}
public async start() {
for (const url of this.config.hosts) {
this.ctx.logger.info('开始连接反向 WebSocket', url)
try {
this.list.push(new OB11WebSocketReverse(this.ctx, { ...this.config, url }))
} catch (e: any) {
this.ctx.logger.error(e.stack)
if (this.list.length > 0) {
return
}
for (const url of this.config.hosts) {
const ws = new OB11WebSocketReverse(this.ctx, { ...this.config, url })
ws.start()
this.list.push(ws)
}
}