mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2025-07-19 12:03:37 +00:00
fix
This commit is contained in:
src
core
packet
onebot
shell
webui
src
helper
static
@@ -12,7 +12,7 @@ export const oidbIpv4s2HighwayIpv4s = (ipv4s: NapProtoEncodeStructType<typeof pr
|
||||
return {
|
||||
domain: {
|
||||
isEnable: true,
|
||||
ip: int32ip2str(ip.outIP!),
|
||||
ip: int32ip2str(ip.outIP ?? 0),
|
||||
},
|
||||
port: ip.outPort!
|
||||
} as NapProtoEncodeStructType<typeof proto.NTHighwayIPv4>;
|
||||
|
@@ -82,7 +82,7 @@ export class PacketMsgConverter {
|
||||
return SupportedElementTypes.includes(type);
|
||||
}
|
||||
|
||||
private rawToPacketMsgConverters: ElementToPacketMsgConverters = {
|
||||
private readonly rawToPacketMsgConverters: ElementToPacketMsgConverters = {
|
||||
[ElementType.TEXT]: (element) => {
|
||||
if (element.textElement?.atType) {
|
||||
return new PacketMsgAtElement(element as SendTextElement);
|
||||
|
@@ -3,7 +3,6 @@ import { OB11Entities } from '@/onebot/entities';
|
||||
import BaseAction from '../BaseAction';
|
||||
import { ActionName } from '../types';
|
||||
import { FromSchema, JSONSchema } from 'json-schema-to-ts';
|
||||
import { GroupMember } from '@/core';
|
||||
|
||||
const SchemaData = {
|
||||
type: 'object',
|
||||
|
@@ -18,7 +18,7 @@ export class OB11ActiveWebSocketAdapter implements IOB11NetworkAdapter {
|
||||
public url: string,
|
||||
public reconnectIntervalInMillis: number,
|
||||
public heartbeatIntervalInMillis: number,
|
||||
private token: string,
|
||||
private readonly token: string,
|
||||
public core: NapCatCore,
|
||||
public actions: ActionMap,
|
||||
) {
|
||||
|
@@ -255,7 +255,7 @@ export async function NCoreInitShell() {
|
||||
// from initSession
|
||||
const sessionConfig = await genSessionConfig(
|
||||
guid,
|
||||
basicInfoWrapper.QQVersionAppid!,
|
||||
basicInfoWrapper.QQVersionAppid,
|
||||
basicInfoWrapper.getFullQQVesion(),
|
||||
selfInfo.uin,
|
||||
selfInfo.uid,
|
||||
|
@@ -11,7 +11,7 @@ interface WebUiCredentialJson {
|
||||
}
|
||||
|
||||
export class AuthHelper {
|
||||
private static secretKey = Math.random().toString(36).slice(2);
|
||||
private static readonly secretKey = Math.random().toString(36).slice(2);
|
||||
|
||||
/**
|
||||
* 签名凭证方法。
|
||||
|
@@ -114,7 +114,7 @@ export class WebUiConfigWrapper {
|
||||
// 不希望回写的配置放后面
|
||||
|
||||
// 查询主机地址是否可用
|
||||
const [host_err, host] = await tryUseHost(parsedConfig.host).then(data => [null, data as string]).catch(err => [err, null]);
|
||||
const [host_err, host] = await tryUseHost(parsedConfig.host).then(data => [null, data]).catch(err => [err, null]);
|
||||
if (host_err) {
|
||||
console.log('host不可用', host_err);
|
||||
parsedConfig.port = 0; // 设置为0,禁用WebUI
|
||||
|
@@ -78,7 +78,6 @@
|
||||
return;
|
||||
}
|
||||
window.location.href = './login.html';
|
||||
return;
|
||||
}
|
||||
InitPage();
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user