mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2025-07-19 12:03:37 +00:00
Compare commits
124 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
ae0277f33c | ||
![]() |
b863896249 | ||
![]() |
5b42f8b743 | ||
![]() |
3883fab614 | ||
![]() |
61d6bcec4b | ||
![]() |
3b5902b033 | ||
![]() |
3a88c21a3b | ||
![]() |
91a5055dee | ||
![]() |
7befd1469f | ||
![]() |
c72ebe495c | ||
![]() |
19e06b97e6 | ||
![]() |
7519825303 | ||
![]() |
d9315bf309 | ||
![]() |
8c36c809a0 | ||
![]() |
8138aa3cb2 | ||
![]() |
87aef3ca78 | ||
![]() |
a3f1d26d6b | ||
![]() |
06cebc5670 | ||
![]() |
867fd62d77 | ||
![]() |
650cdf2916 | ||
![]() |
ebf461f2fd | ||
![]() |
27fa319b2a | ||
![]() |
d95ac894f4 | ||
![]() |
ae84a8dd11 | ||
![]() |
2fc963f986 | ||
![]() |
be1f938ebd | ||
![]() |
cccf4d503d | ||
![]() |
9dad2a8ac6 | ||
![]() |
75af104f07 | ||
![]() |
76ecba245b | ||
![]() |
3697c2ced8 | ||
![]() |
b9d1d84716 | ||
![]() |
64b2d547ce | ||
![]() |
d8d2ff7e4e | ||
![]() |
8aa5dc6482 | ||
![]() |
474ba20e61 | ||
![]() |
bdea2d02a9 | ||
![]() |
c4307481f1 | ||
![]() |
b8ac1b28bd | ||
![]() |
24038cda95 | ||
![]() |
86c82e9608 | ||
![]() |
daab5d150b | ||
![]() |
9ff82bdb90 | ||
![]() |
c6d70ef1cf | ||
![]() |
15d4bb3c76 | ||
![]() |
3e698981fd | ||
![]() |
9d45c934a5 | ||
![]() |
c2bf9cf93e | ||
![]() |
b3c6fd7f26 | ||
![]() |
ccd155de71 | ||
![]() |
1f90d2e46b | ||
![]() |
4c5d974c22 | ||
![]() |
392eda1cbc | ||
![]() |
a9da3279e8 | ||
![]() |
1ce8351180 | ||
![]() |
96c334478a | ||
![]() |
f1b0875b05 | ||
![]() |
cea9e11c83 | ||
![]() |
f098b39200 | ||
![]() |
012d948b59 | ||
![]() |
3334cd0a71 | ||
![]() |
d63d53fd88 | ||
![]() |
a7fa39b2fd | ||
![]() |
40bb42e193 | ||
![]() |
9c382c639b | ||
![]() |
a43cde38f1 | ||
![]() |
c35d2e08cd | ||
![]() |
3377c383c1 | ||
![]() |
c00e6d95cd | ||
![]() |
725fccf4ed | ||
![]() |
13129bd219 | ||
![]() |
4561977bcf | ||
![]() |
40be8a91f5 | ||
![]() |
2a04d5830b | ||
![]() |
82a38574f3 | ||
![]() |
fea3a33c2b | ||
![]() |
9a502cdf6f | ||
![]() |
4b616299cf | ||
![]() |
102243e064 | ||
![]() |
4b21ac5ebe | ||
![]() |
4dd7363dd3 | ||
![]() |
3d5e5ab78f | ||
![]() |
73045a1b21 | ||
![]() |
871173a7cf | ||
![]() |
0002313093 | ||
![]() |
948cf5cca6 | ||
![]() |
d40230879c | ||
![]() |
ab22b775f1 | ||
![]() |
42c85224ba | ||
![]() |
e57444a353 | ||
![]() |
3c6503d495 | ||
![]() |
149b518f48 | ||
![]() |
74621447ff | ||
![]() |
3280952931 | ||
![]() |
9e670e2736 | ||
![]() |
9fc6347a2f | ||
![]() |
ec7a15a192 | ||
![]() |
7f99982810 | ||
![]() |
935d83aaf8 | ||
![]() |
0ff6edd546 | ||
![]() |
94f629585a | ||
![]() |
89c04be02f | ||
![]() |
3151965ea8 | ||
![]() |
bdf5159be1 | ||
![]() |
0499ebbea3 | ||
![]() |
d5843b7236 | ||
![]() |
1c9c574a90 | ||
![]() |
39acf20e48 | ||
![]() |
52eb6ed5ab | ||
![]() |
ee78d2d59d | ||
![]() |
60dc5c4a38 | ||
![]() |
50a0dc0355 | ||
![]() |
3f681ec914 | ||
![]() |
0bf499f191 | ||
![]() |
389695a0d6 | ||
![]() |
07f1afb312 | ||
![]() |
ae91e61304 | ||
![]() |
6248991b01 | ||
![]() |
7f2d57ef62 | ||
![]() |
31f8f884f1 | ||
![]() |
4f4af5985a | ||
![]() |
a716fdf6d4 | ||
![]() |
9717f64abd | ||
![]() |
adf239183a |
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@@ -47,7 +47,7 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
target_platform: [win32]
|
||||
target_arch: [x64]
|
||||
target_arch: [x64,ia32]
|
||||
steps:
|
||||
- name: Clone Main Repository
|
||||
uses: actions/checkout@v4
|
||||
|
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
@@ -72,7 +72,7 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
target_platform: [win32]
|
||||
target_arch: [x64]
|
||||
target_arch: [x64,ia32]
|
||||
steps:
|
||||
- name: Clone Main Repository
|
||||
uses: actions/checkout@v4
|
||||
|
14
docs/changelogs/CHANGELOG.v1.5.8.md
Normal file
14
docs/changelogs/CHANGELOG.v1.5.8.md
Normal file
@@ -0,0 +1,14 @@
|
||||
# v1.5.8
|
||||
|
||||
QQ Version: Windows 9.9.11-24568 / Linux 3.2.9-24568
|
||||
|
||||
## 修复与优化
|
||||
* 修复视频文件残留问题
|
||||
* 重构 getcookies接口 支持大部分常见域
|
||||
|
||||
## 新增与调整
|
||||
* 日志大小限制
|
||||
* 支持 QQ音乐 卡片 无签名支持时 启用内置方法(缺点没有封面 限速1min/条)
|
||||
* 支持Window X86-32机器
|
||||
|
||||
新增的 API 详细见[API文档](https://napneko.github.io/zh-CN/develop/extends_api)
|
@@ -1,10 +1,10 @@
|
||||
# v1.4.4
|
||||
|
||||
QQ Version: Windows 9.9.10-24108 / Linux 3.2.7-23361
|
||||
|
||||
## 更新
|
||||
* **重大更新:**更新了版本号
|
||||
|
||||
|
||||
新增的 API 详细见[API文档](https://napneko.github.io/zh-CN/develop/extends_api)
|
||||
|
||||
# v1.4.4
|
||||
|
||||
QQ Version: Windows 9.9.10-24108 / Linux 3.2.7-23361
|
||||
|
||||
## 更新
|
||||
* **重大更新:**更新了版本号
|
||||
|
||||
|
||||
新增的 API 详细见[API文档](https://napneko.github.io/zh-CN/develop/extends_api)
|
||||
|
12
docs/changelogs/old/CHANGELOG.v1.4.5.md
Normal file
12
docs/changelogs/old/CHANGELOG.v1.4.5.md
Normal file
@@ -0,0 +1,12 @@
|
||||
# v1.4.5
|
||||
|
||||
QQ Version: Windows 9.9.10-24108 / Linux 3.2.7-23361
|
||||
|
||||
## 修复与优化
|
||||
* 紧急修复二维扫码问题
|
||||
|
||||
## 新增与调整
|
||||
|
||||
|
||||
新增的 API 详细见[API文档](https://napneko.github.io/zh-CN/develop/extends_api)
|
||||
|
12
docs/changelogs/old/CHANGELOG.v1.4.6.md
Normal file
12
docs/changelogs/old/CHANGELOG.v1.4.6.md
Normal file
@@ -0,0 +1,12 @@
|
||||
# v1.4.6
|
||||
|
||||
QQ Version: Windows 9.9.10-24108 / Linux 3.2.7-23361
|
||||
|
||||
## 修复与优化
|
||||
* 优化整体稳定性
|
||||
|
||||
## 新增与调整
|
||||
|
||||
|
||||
新增的 API 详细见[API文档](https://napneko.github.io/zh-CN/develop/extends_api)
|
||||
|
11
docs/changelogs/old/CHANGELOG.v1.4.7.md
Normal file
11
docs/changelogs/old/CHANGELOG.v1.4.7.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# v1.4.7
|
||||
|
||||
QQ Version: Windows 9.9.10-24108 / Linux 3.2.7-23361
|
||||
|
||||
## 修复与优化
|
||||
* 临时扩展 Api: GoCQHTTPUploadGroupFile folder_id字段 用于选择文件夹
|
||||
|
||||
## 新增与调整
|
||||
|
||||
|
||||
新增的 API 详细见[API文档](https://napneko.github.io/zh-CN/develop/extends_api)
|
12
docs/changelogs/old/CHANGELOG.v1.4.8.md
Normal file
12
docs/changelogs/old/CHANGELOG.v1.4.8.md
Normal file
@@ -0,0 +1,12 @@
|
||||
# v1.4.8
|
||||
|
||||
QQ Version: Windows 9.9.10-24108 / Linux 3.2.7-23361
|
||||
|
||||
## 修复与优化
|
||||
* 优化Guid的生成方式
|
||||
* 支持临时消息获取群来源
|
||||
|
||||
## 新增与调整
|
||||
|
||||
|
||||
新增的 API 详细见[API文档](https://napneko.github.io/zh-CN/develop/extends_api)
|
11
docs/changelogs/old/CHANGELOG.v1.4.9.md
Normal file
11
docs/changelogs/old/CHANGELOG.v1.4.9.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# v1.4.9
|
||||
|
||||
QQ Version: Windows 9.9.10-24108 / Linux 3.2.7-23361
|
||||
|
||||
## 修复与优化
|
||||
* 修复接口调用问题 接口标准化 API:set_group_add_request
|
||||
|
||||
## 新增与调整
|
||||
|
||||
|
||||
新增的 API 详细见[API文档](https://napneko.github.io/zh-CN/develop/extends_api)
|
11
docs/changelogs/old/CHANGELOG.v1.5.0.md
Normal file
11
docs/changelogs/old/CHANGELOG.v1.5.0.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# v1.5.0
|
||||
|
||||
QQ Version: Windows 9.9.10-24108 / Linux 3.2.7-23361
|
||||
|
||||
## 修复与优化
|
||||
* 修正各Api默认值
|
||||
|
||||
## 新增与调整
|
||||
|
||||
|
||||
新增的 API 详细见[API文档](https://napneko.github.io/zh-CN/develop/extends_api)
|
12
docs/changelogs/old/CHANGELOG.v1.5.1.md
Normal file
12
docs/changelogs/old/CHANGELOG.v1.5.1.md
Normal file
@@ -0,0 +1,12 @@
|
||||
# v1.5.1
|
||||
|
||||
QQ Version: Windows 9.9.10-24108 / Linux 3.2.7-23361
|
||||
|
||||
## 修复与优化
|
||||
* 支持 新Api: set_self_profile 可设置个性签名
|
||||
* 修复 Api: get_group_system_msg
|
||||
* 整理日志、添加颜色、使用统一的日志函数以提高日志可读性
|
||||
## 新增与调整
|
||||
|
||||
|
||||
新增的 API 详细见[API文档](https://napneko.github.io/zh-CN/develop/extends_api)
|
13
docs/changelogs/old/CHANGELOG.v1.5.2.md
Normal file
13
docs/changelogs/old/CHANGELOG.v1.5.2.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# v1.5.2
|
||||
|
||||
QQ Version: Windows 9.9.10-24108 / Linux 3.2.7-23361
|
||||
|
||||
## 修复与优化
|
||||
* 替换Uid/Uin为内部实现
|
||||
* 增加HttpApi调用稳定性
|
||||
* 修复 GetMsg 兼容性
|
||||
|
||||
## 新增与调整
|
||||
* 支持真正意义上的陌生人信息获取 Api: GoCQHTTP_GetStrangerInfo
|
||||
|
||||
新增的 API 详细见[API文档](https://napneko.github.io/zh-CN/develop/extends_api)
|
15
docs/changelogs/old/CHANGELOG.v1.5.3.md
Normal file
15
docs/changelogs/old/CHANGELOG.v1.5.3.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# v1.5.3
|
||||
|
||||
QQ Version: Windows 9.9.11-24568 / Linux 3.2.9-23568
|
||||
|
||||
## 修复与优化
|
||||
* 修复引用消息id问题
|
||||
* 修复添加好友的通知
|
||||
|
||||
## 新增与调整
|
||||
* 扩展群分享Json生成
|
||||
* 扩展关于收藏的一系列接口
|
||||
* 支持专属群头衔获取
|
||||
* 支持视频获取直链
|
||||
|
||||
新增的 API 详细见[API文档](https://napneko.github.io/zh-CN/develop/extends_api)
|
11
docs/changelogs/old/CHANGELOG.v1.5.4.md
Normal file
11
docs/changelogs/old/CHANGELOG.v1.5.4.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# v1.5.4
|
||||
|
||||
QQ Version: Windows 9.9.11-24568 / Linux 3.2.9-23568
|
||||
|
||||
## 修复与优化
|
||||
* 紧急修复视频与文件问题
|
||||
|
||||
## 新增与调整
|
||||
|
||||
|
||||
新增的 API 详细见[API文档](https://napneko.github.io/zh-CN/develop/extends_api)
|
11
docs/changelogs/old/CHANGELOG.v1.5.5.md
Normal file
11
docs/changelogs/old/CHANGELOG.v1.5.5.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# v1.5.5
|
||||
|
||||
QQ Version: Windows 9.9.11-24568 / Linux 3.2.9-23568
|
||||
|
||||
## 修复与优化
|
||||
* 紧急修复一些问题
|
||||
|
||||
## 新增与调整
|
||||
|
||||
|
||||
新增的 API 详细见[API文档](https://napneko.github.io/zh-CN/develop/extends_api)
|
11
docs/changelogs/old/CHANGELOG.v1.5.6.md
Normal file
11
docs/changelogs/old/CHANGELOG.v1.5.6.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# v1.5.6
|
||||
|
||||
QQ Version: Windows 9.9.11-24568 / Linux 3.2.9-24568
|
||||
|
||||
## 修复与优化
|
||||
* 修复一些问题
|
||||
|
||||
## 新增与调整
|
||||
|
||||
|
||||
新增的 API 详细见[API文档](https://napneko.github.io/zh-CN/develop/extends_api)
|
11
docs/changelogs/old/CHANGELOG.v1.5.7.md
Normal file
11
docs/changelogs/old/CHANGELOG.v1.5.7.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# v1.5.7
|
||||
|
||||
QQ Version: Windows 9.9.11-24568 / Linux 3.2.9-24568
|
||||
|
||||
## 修复与优化
|
||||
* 修复一些问题
|
||||
|
||||
## 新增与调整
|
||||
|
||||
|
||||
新增的 API 详细见[API文档](https://napneko.github.io/zh-CN/develop/extends_api)
|
2
docs/develop/Android.md
Normal file
2
docs/develop/Android.md
Normal file
@@ -0,0 +1,2 @@
|
||||
# 开始
|
||||
jadx 跳转于 `com.tencent.qqnt.kernel.*`
|
42
docs/develop/GetMemberExt.md
Normal file
42
docs/develop/GetMemberExt.md
Normal file
@@ -0,0 +1,42 @@
|
||||
# Android
|
||||
```java
|
||||
GroupMemberExtReq groupMemberExtReq = new GroupMemberExtReq();
|
||||
groupMemberExtReq.sourceType = MemberExtSourceType.TITLETYPE.ordinal();
|
||||
groupMemberExtReq.groupCode = longOrNull.longValue();
|
||||
groupMemberExtReq.beginUin = "0";
|
||||
groupMemberExtReq.dataTime = "0";
|
||||
Long[] lArr = new Long[1];
|
||||
AppInterface a2 = dVar.a();
|
||||
lArr[0] = Long.valueOf(a2 != null ? a2.getLongAccountUin() : 0L);
|
||||
arrayListOf = CollectionsKt__CollectionsKt.arrayListOf(lArr);
|
||||
groupMemberExtReq.uinList = arrayListOf;
|
||||
MemberExtInfoFilter memberExtInfoFilter = new MemberExtInfoFilter();
|
||||
memberExtInfoFilter.memberLevelInfoUin = 1;
|
||||
memberExtInfoFilter.memberLevelInfoPoint = 1;
|
||||
memberExtInfoFilter.memberLevelInfoActiveDay = 1;
|
||||
memberExtInfoFilter.memberLevelInfoLevel = 1;
|
||||
memberExtInfoFilter.levelName = 1;
|
||||
memberExtInfoFilter.dataTime = 1;
|
||||
memberExtInfoFilter.sysShowFlag = 1;
|
||||
memberExtInfoFilter.userShowFlag = 1;
|
||||
memberExtInfoFilter.userShowFlagNew = 1;
|
||||
memberExtInfoFilter.levelNameNew = 1;
|
||||
Unit unit = Unit.INSTANCE;
|
||||
groupMemberExtReq.memberExtFilter = memberExtInfoFilter;
|
||||
troopLevelFrequencyControl.f(troopUin, new TroopListRepo$fetchTroopLevelInfo$2(b2, groupMemberExtReq, troopUin, new com.tencent.qqnt.troopmemberlist.report.c("fetchTroopLevelInfo")));
|
||||
```
|
||||
# Win
|
||||
参数解析位于 sub_181456A10(24108) -> wrapper.node(24108)+1456A10
|
||||
IGroupService.GetMemberExt(param: object);
|
||||
param展开如下
|
||||
```
|
||||
groupCode string
|
||||
beginUin string
|
||||
dataTime string
|
||||
uinList Array<string>
|
||||
uinNum string
|
||||
groupType string
|
||||
richCardNameVer string
|
||||
sourceType number
|
||||
memberExtFilter object// 参数解析位于 sub_18145A6D0(24108) -> wrapper.node(24108)+145A6D0
|
||||
```
|
48
docs/develop/Image.NTAndroid.md
Normal file
48
docs/develop/Image.NTAndroid.md
Normal file
@@ -0,0 +1,48 @@
|
||||
public static final int C2C_PIC_DOWNLOAD = 1004;
|
||||
public static final String C2C_PIC_DOWNLOAD_DOMAIN = "c2cpicdw.qpic.cn";
|
||||
public static final String C2C_PIC_DOWNLOAD_QUIC_DOMAIN = "c2cpicdw.quic.qpic.cn";
|
||||
public static final int FLAG_NOT_UPLOAD = 3;
|
||||
public static final int FLAG_UPLOADINFO_ERROR = 4;
|
||||
public static final int GROUP_PIC_DOWNLOAD = 1000;
|
||||
public static final String GROUP_PIC_DOWNLOAD_DOMAIN = "gchat.qpic.cn";
|
||||
public static final String GROUP_PIC_DOWNLOAD_QUIC_DOMAIN = "gchat.quic.qpic.cn";
|
||||
public static final String GUILD_PIC_DOWNLOAD_DOMAIN = "gchat.qpic.cn/qmeetpic";
|
||||
public static final boolean NEW_STORE_FLAG = true;
|
||||
public static final String PTT_VIDEO_DOWNLOAD_DOMAIN = "grouptalk.c2c.qq.com";
|
||||
|
||||
protected static final int AVIF_DECODE_EXCEPTION = 4;
|
||||
protected static final int AVIF_DECODE_FAIL = 1;
|
||||
protected static final int AVIF_DECODE_FAIL_SO_FAIL = 2;
|
||||
protected static final int AVIF_DECODE_FAIL_UNKNOWN = 6;
|
||||
protected static final int AVIF_DECODE_FILETYPE_ERROR = 5;
|
||||
protected static final int AVIF_DECODE_OOM = 3;
|
||||
protected static final int AVIF_DECODE_RENAME_FAIL = 7;
|
||||
protected static final int AVIF_DECODE_SUC = 0;
|
||||
public static final String AVIF_FILE_SUFFIX = ".avif";
|
||||
public static final int AVIF_REQ_APPRUNTIME_NULL = 12;
|
||||
public static final int AVIF_REQ_CODEC_UNSURPPORT = 5;
|
||||
protected static final int AVIF_REQ_DENSITY_UNSURPPORT = 10;
|
||||
protected static final int AVIF_REQ_FLASH_PHOTO = 9;
|
||||
protected static final int AVIF_REQ_HAS_TMP_AVIF = 7;
|
||||
protected static final int AVIF_REQ_INVALID_MSG_RECORD = 2;
|
||||
protected static final int AVIF_REQ_IS_RAW_PHOTO = 3;
|
||||
protected static final int AVIF_REQ_OUTPUTSTREAM_UNSURPPORT = 11;
|
||||
protected static final int AVIF_REQ_OVERSIZE = 6;
|
||||
protected static final int AVIF_REQ_RETRY = 1;
|
||||
public static final int AVIF_REQ_SO_DOWNLOAD_FAILED = 8;
|
||||
protected static final int AVIF_REQ_SUC = 0;
|
||||
public static final int AVIF_REQ_SWITCH_CLOSE = 4;
|
||||
public static final String C2C_PIC_DOWNLOAD_ERROR_CODE = "C2CPicDownloadErrorCode";
|
||||
static final int DOWNLOAD_ST_COMPLETE = 1;
|
||||
static final int DOWNLOAD_ST_HEAD = 2;
|
||||
static final int DOWNLOAD_ST_LEFT = 4;
|
||||
static final int DOWNLOAD_ST_PART = 3;
|
||||
private static final int ENCRYPT_APPID = 1600000226;
|
||||
public static final String GROUP_PIC_DOWNLOAD_ERROR_CODE = "GroupPicDownloadErrorCode";
|
||||
public static final String KEY_PIC_DOWNLOAD_ERROR_CODE = "param_detail_code";
|
||||
protected static final int QUIC_FAIL_IP_LIST_EMPTY = 1;
|
||||
protected static final int QUIC_FAIL_REQUEST_HTTPS = 3;
|
||||
protected static final int QUIC_FAIL_REQUEST_QUIC = 2;
|
||||
protected static final int QUIC_FAIL_SO_LOAD = 4;
|
||||
public static final String REPORT_TAG_DIRECT_DOWNLOAD_FAIL = "report_direct_download_fail";
|
||||
public static final String REQ_PARAM_AVIF = "tp=avif";
|
444
docs/develop/Msg常量NTAndroid.md
Normal file
444
docs/develop/Msg常量NTAndroid.md
Normal file
@@ -0,0 +1,444 @@
|
||||
```java
|
||||
MsgConstant
|
||||
int ARKSTRUCTELEMENTSUBTYPETENCENTDOCFROMMINIAPP = 1;
|
||||
int ARKSTRUCTELEMENTSUBTYPETENCENTDOCFROMPLUSPANEL = 2;
|
||||
int ARKSTRUCTELEMENTSUBTYPEUNKNOWN = 0;
|
||||
int ATTYPEALL = 1;
|
||||
int ATTYPECATEGORY = 512;
|
||||
int ATTYPECHANNEL = 16;
|
||||
int ATTYPEME = 4;
|
||||
int ATTYPEONE = 2;
|
||||
int ATTYPEONLINE = 64;
|
||||
int ATTYPEROLE = 8;
|
||||
int ATTYPESUMMON = 32;
|
||||
int ATTYPESUMMONONLINE = 128;
|
||||
int ATTYPESUMMONROLE = 256;
|
||||
int ATTYPEUNKNOWN = 0;
|
||||
int CALENDARELEMSUBTYPECOMMON = 3;
|
||||
int CALENDARELEMSUBTYPESTRONG = 1;
|
||||
int CALENDARELEMSUBTYPEUNKNOWN = 0;
|
||||
int CALENDARELEMSUBTYPEWEAK = 2;
|
||||
int FACEBUBBLEELEMSUBTYPENORMAL = 1;
|
||||
int FACEBUBBLEELEMSUBTYPEUNKNOWN = 0;
|
||||
int FETCHLONGMSGERRCODEMSGEXPIRED = 196;
|
||||
int FILEELEMENTSUBTYPEAI = 16;
|
||||
int FILEELEMENTSUBTYPEAPP = 11;
|
||||
int FILEELEMENTSUBTYPEAUDIO = 3;
|
||||
int FILEELEMENTSUBTYPEDOC = 4;
|
||||
int FILEELEMENTSUBTYPEEMOTICON = 15;
|
||||
int FILEELEMENTSUBTYPEEXCEL = 6;
|
||||
int FILEELEMENTSUBTYPEFOLDER = 13;
|
||||
int FILEELEMENTSUBTYPEHTML = 10;
|
||||
int FILEELEMENTSUBTYPEIPA = 14;
|
||||
int FILEELEMENTSUBTYPENORMAL = 0;
|
||||
int FILEELEMENTSUBTYPEPDF = 7;
|
||||
int FILEELEMENTSUBTYPEPIC = 1;
|
||||
int FILEELEMENTSUBTYPEPPT = 5;
|
||||
int FILEELEMENTSUBTYPEPSD = 12;
|
||||
int FILEELEMENTSUBTYPETXT = 8;
|
||||
int FILEELEMENTSUBTYPEVIDEO = 2;
|
||||
int FILEELEMENTSUBTYPEZIP = 9;
|
||||
int GRAYTIPELEMENTSUBTYPEAIOOP = 15;
|
||||
int GRAYTIPELEMENTSUBTYPEBLOCK = 14;
|
||||
int GRAYTIPELEMENTSUBTYPEBUDDY = 5;
|
||||
int GRAYTIPELEMENTSUBTYPEBUDDYNOTIFY = 9;
|
||||
int GRAYTIPELEMENTSUBTYPEEMOJIREPLY = 3;
|
||||
int GRAYTIPELEMENTSUBTYPEESSENCE = 7;
|
||||
int GRAYTIPELEMENTSUBTYPEFEED = 6;
|
||||
int GRAYTIPELEMENTSUBTYPEFEEDCHANNELMSG = 11;
|
||||
int GRAYTIPELEMENTSUBTYPEFILE = 10;
|
||||
int GRAYTIPELEMENTSUBTYPEGROUP = 4;
|
||||
int GRAYTIPELEMENTSUBTYPEGROUPNOTIFY = 8;
|
||||
int GRAYTIPELEMENTSUBTYPEJSON = 17;
|
||||
int GRAYTIPELEMENTSUBTYPELOCALMSG = 13;
|
||||
int GRAYTIPELEMENTSUBTYPEPROCLAMATION = 2;
|
||||
int GRAYTIPELEMENTSUBTYPEREVOKE = 1;
|
||||
int GRAYTIPELEMENTSUBTYPEUNKNOWN = 0;
|
||||
int GRAYTIPELEMENTSUBTYPEWALLET = 16;
|
||||
int GRAYTIPELEMENTSUBTYPEXMLMSG = 12;
|
||||
int INLINEKEYBOARDBUTTONRENDERSTYLEBLUEBLACKGROUND = 4;
|
||||
int INLINEKEYBOARDBUTTONRENDERSTYLEBLUEBORDER = 1;
|
||||
int INLINEKEYBOARDBUTTONRENDERSTYLEGRAYBORDER = 0;
|
||||
int INLINEKEYBOARDBUTTONRENDERSTYLENOBORDER = 2;
|
||||
int INLINEKEYBOARDBUTTONRENDERSTYLEREDCHARACTER = 3;
|
||||
int INPUTSTATUSTYPECANCEL = 2;
|
||||
int INPUTSTATUSTYPESPEAK = 3;
|
||||
int INPUTSTATUSTYPETEXT = 1;
|
||||
int KACTIVITYMSG = 22;
|
||||
int KADDLOCALMSGEXTINFOTYPEPROLOGUEMSG = 1;
|
||||
int KANONYMOUSATMEMSGTYPEINMSGBOX = 1001;
|
||||
int KANONYMOUSFLAGFROMOTHERPEOPLE = 1;
|
||||
int KANONYMOUSFLAGFROMOWN = 2;
|
||||
int KANONYMOUSFLAGINVALID = 0;
|
||||
int KAPPCHANNELMSG = 16;
|
||||
int KATALLMSGTYPEINMSGBOX = 2000;
|
||||
int KATMEMSGTYPEINMSGBOX = 1000;
|
||||
int KATTRIBUTETYPEADELIEMSG = 16;
|
||||
int KATTRIBUTETYPEEXTENDBUSINESS = 13;
|
||||
int KATTRIBUTETYPEFEEDBACKSTATE = 17;
|
||||
int KATTRIBUTETYPEGROUPHONOR = 2;
|
||||
int KATTRIBUTETYPEKINGHONOR = 3;
|
||||
int KATTRIBUTETYPELONGMSG = 8;
|
||||
int KATTRIBUTETYPEMEMORYSTATEMSGINFO = 18;
|
||||
int KATTRIBUTETYPEMSG = 0;
|
||||
int KATTRIBUTETYPEMSGBOXEVENTTYPE = 14;
|
||||
int KATTRIBUTETYPEPERSONAL = 1;
|
||||
int KATTRIBUTETYPEPUBLICACCOUNT = 4;
|
||||
int KATTRIBUTETYPEQQCONNECT = 12;
|
||||
int KATTRIBUTETYPESENDMSGRSPTRANSSVRINFO = 15;
|
||||
int KATTRIBUTETYPESHAREDMSGINFO = 5;
|
||||
int KATTRIBUTETYPETEMPCHATGAMESESSION = 6;
|
||||
int KATTRIBUTETYPETOROBOTMSG = 9;
|
||||
int KATTRIBUTETYPEUININFO = 7;
|
||||
int KATTRIBUTETYPEZPLAN = 11;
|
||||
int KAUTOREPLYTEXTNONEINDEX = -1;
|
||||
int KAVRECORDMSG = 19;
|
||||
int KBUSINESSTYPGUILD = 1;
|
||||
int KBUSINESSTYPNT = 0;
|
||||
int KCHATTYPEADELIE = 42;
|
||||
int KCHATTYPEBUDDYNOTIFY = 5;
|
||||
int KCHATTYPEC2C = 1;
|
||||
int KCHATTYPECIRCLE = 113;
|
||||
int KCHATTYPEDATALINE = 8;
|
||||
int KCHATTYPEDATALINEMQQ = 134;
|
||||
int KCHATTYPEDISC = 3;
|
||||
int KCHATTYPEFAV = 41;
|
||||
int KCHATTYPEGAMEMESSAGE = 105;
|
||||
int KCHATTYPEGAMEMESSAGEFOLDER = 116;
|
||||
int KCHATTYPEGROUP = 2;
|
||||
int KCHATTYPEGROUPBLESS = 133;
|
||||
int KCHATTYPEGROUPGUILD = 9;
|
||||
int KCHATTYPEGROUPHELPER = 7;
|
||||
int KCHATTYPEGROUPNOTIFY = 6;
|
||||
int KCHATTYPEGUILD = 4;
|
||||
int KCHATTYPEGUILDMETA = 16;
|
||||
int KCHATTYPEMATCHFRIEND = 104;
|
||||
int KCHATTYPEMATCHFRIENDFOLDER = 109;
|
||||
int KCHATTYPENEARBY = 106;
|
||||
int KCHATTYPENEARBYASSISTANT = 107;
|
||||
int KCHATTYPENEARBYFOLDER = 110;
|
||||
int KCHATTYPENEARBYHELLOFOLDER = 112;
|
||||
int KCHATTYPENEARBYINTERACT = 108;
|
||||
int KCHATTYPEQQNOTIFY = 132;
|
||||
int KCHATTYPERELATEACCOUNT = 131;
|
||||
int KCHATTYPESERVICEASSISTANT = 118;
|
||||
int KCHATTYPESERVICEASSISTANTSUB = 201;
|
||||
int KCHATTYPESQUAREPUBLIC = 115;
|
||||
int KCHATTYPESUBSCRIBEFOLDER = 30;
|
||||
int KCHATTYPETEMPADDRESSBOOK = 111;
|
||||
int KCHATTYPETEMPBUSSINESSCRM = 102;
|
||||
int KCHATTYPETEMPC2CFROMGROUP = 100;
|
||||
int KCHATTYPETEMPC2CFROMUNKNOWN = 99;
|
||||
int KCHATTYPETEMPFRIENDVERIFY = 101;
|
||||
int KCHATTYPETEMPNEARBYPRO = 119;
|
||||
int KCHATTYPETEMPPUBLICACCOUNT = 103;
|
||||
int KCHATTYPETEMPWPA = 117;
|
||||
int KCHATTYPEUNKNOWN = 0;
|
||||
int KCHATTYPEWEIYUN = 40;
|
||||
int KCOMMONREDENVELOPEMSGTYPEINMSGBOX = 1007;
|
||||
int KDOWNSOURCETYPEAIOINNER = 1;
|
||||
int KDOWNSOURCETYPEBIGSCREEN = 2;
|
||||
int KDOWNSOURCETYPEHISTORY = 3;
|
||||
int KDOWNSOURCETYPEUNKNOWN = 0;
|
||||
int KELEMTYPEACTIVITY = 25;
|
||||
int KELEMTYPEACTIVITYSTATE = 41;
|
||||
int KELEMTYPEACTIVITYSUBTYPECREATEMOBATEAM = 12;
|
||||
int KELEMTYPEACTIVITYSUBTYPEDISBANDMOBATEAM = 11;
|
||||
int KELEMTYPEACTIVITYSUBTYPEFEEDSQUARE = 10001;
|
||||
int KELEMTYPEACTIVITYSUBTYPEFINISHGAME = 16;
|
||||
int KELEMTYPEACTIVITYSUBTYPEFINISHMATCHTEAM = 14;
|
||||
int KELEMTYPEACTIVITYSUBTYPEHOTCHAT = 10000;
|
||||
int KELEMTYPEACTIVITYSUBTYPEMINIGAME = 18;
|
||||
int KELEMTYPEACTIVITYSUBTYPEMUSICPLAY = 17;
|
||||
int KELEMTYPEACTIVITYSUBTYPENEWSMOBA = 9;
|
||||
int KELEMTYPEACTIVITYSUBTYPENOLIVE = 2;
|
||||
int KELEMTYPEACTIVITYSUBTYPENOSCREENSHARE = 7;
|
||||
int KELEMTYPEACTIVITYSUBTYPENOVOICE = 3;
|
||||
int KELEMTYPEACTIVITYSUBTYPEONLIVE = 1;
|
||||
int KELEMTYPEACTIVITYSUBTYPEONSCREENSHARE = 6;
|
||||
int KELEMTYPEACTIVITYSUBTYPEONVOICE = 4;
|
||||
int KELEMTYPEACTIVITYSUBTYPESTARTMATCHTEAM = 13;
|
||||
int KELEMTYPEACTIVITYSUBTYPETARTGAME = 15;
|
||||
int KELEMTYPEACTIVITYSUBTYPEUNKNOWN = 0;
|
||||
int KELEMTYPEADELIEACTIONBAR = 44;
|
||||
int KELEMTYPEADELIERECOMMENDEDMSG = 43;
|
||||
int KELEMTYPEARKSTRUCT = 10;
|
||||
int KELEMTYPEAVRECORD = 21;
|
||||
int KELEMTYPECALENDAR = 19;
|
||||
int KELEMTYPEFACE = 6;
|
||||
int KELEMTYPEFACEBUBBLE = 27;
|
||||
int KELEMTYPEFEED = 22;
|
||||
int KELEMTYPEFILE = 3;
|
||||
int KELEMTYPEGIPHY = 15;
|
||||
int KELEMTYPEGRAYTIP = 8;
|
||||
int KELEMTYPEINLINEKEYBOARD = 17;
|
||||
int KELEMTYPEINTEXTGIFT = 18;
|
||||
int KELEMTYPELIVEGIFT = 12;
|
||||
int KELEMTYPEMARKDOWN = 14;
|
||||
int KELEMTYPEMARKETFACE = 11;
|
||||
int KELEMTYPEMULTIFORWARD = 16;
|
||||
int KELEMTYPEONLINEFILE = 23;
|
||||
int KELEMTYPEPIC = 2;
|
||||
int KELEMTYPEPROLOGUE = 46;
|
||||
int KELEMTYPEPTT = 4;
|
||||
int KELEMTYPEREPLY = 7;
|
||||
int KELEMTYPESHARELOCATION = 28;
|
||||
int KELEMTYPESTRUCTLONGMSG = 13;
|
||||
int KELEMTYPETASKTOPMSG = 29;
|
||||
int KELEMTYPETEXT = 1;
|
||||
int KELEMTYPETOFU = 26;
|
||||
int KELEMTYPEUNKNOWN = 0;
|
||||
int KELEMTYPEVIDEO = 5;
|
||||
int KELEMTYPEWALLET = 9;
|
||||
int KELEMTYPEYOLOGAMERESULT = 20;
|
||||
int KENTERAIO = 1;
|
||||
int KEXITAIO = 2;
|
||||
int KFEEDBACKBUTTONTYPEDISLIKE = 2;
|
||||
int KFEEDBACKBUTTONTYPELIKE = 1;
|
||||
int KFEEDBACKBUTTONTYPEPROMPTCLICK = 5;
|
||||
int KFEEDBACKBUTTONTYPEREGENERATE = 4;
|
||||
int KFEEDBACKBUTTONTYPEUNKNOWN = 0;
|
||||
int KFEEDBACKOPTLIKE = 1;
|
||||
int KFEEDBACKOPTUNKNOWN = 0;
|
||||
int KFEEDBACKOPTUNLIKE = 2;
|
||||
int KFRIENDNEWADDEDMSGTYPEINMSGBOX = 1008;
|
||||
int KGAMEBOXNEWMSGTYPEINMSGBOX = 3000;
|
||||
int KGIFTATMEMSGTYPEINMSGBOX = 1005;
|
||||
int KGROUPFILEATALLMSGTYPEINMSGBOX = 2001;
|
||||
int KGROUPHOMEWORK = 20000;
|
||||
int KGROUPHOMEWORKTASK = 20001;
|
||||
int KGROUPKEYWORDMSGTYPEINMSGBOX = 2006;
|
||||
int KGROUPMANNOUNCEATALLMSGTYPEINMSGBOX = 2004;
|
||||
int KGROUPTASKATALLMSGTYPEINMSGBOX = 2003;
|
||||
int KGROUPUNREADTYPEINMSGBOX = 2007;
|
||||
int KGUILDCHANNELLIST = 10;
|
||||
int KHIGHLIGHTWORDINTEMPCHATTYPEINMSGBOX = 1009;
|
||||
int KHOMEWORKREMINDER = 10000;
|
||||
int KLIKEORDISLIKESTATEDISLIKE = 2;
|
||||
int KLIKEORDISLIKESTATELIKE = 1;
|
||||
int KLIKEORDISLIKESTATENONESELECTED = 0;
|
||||
int KMARKETFACE = 17;
|
||||
int KMEMORYSTATEMSGTYPEADELIEWELCOME = 1;
|
||||
int KMEMORYSTATEMSGTYPEUNKNOWN = 0;
|
||||
int KMINIPROGRAMNOTICE = 114;
|
||||
int KMSGSUBTYPEARKGROUPANNOUNCE = 3;
|
||||
int KMSGSUBTYPEARKGROUPANNOUNCECONFIRMREQUIRED = 4;
|
||||
int KMSGSUBTYPEARKGROUPGIFTATME = 5;
|
||||
int KMSGSUBTYPEARKGROUPTASKATALL = 6;
|
||||
int KMSGSUBTYPEARKMULTIMSG = 7;
|
||||
int KMSGSUBTYPEARKNORMAL = 0;
|
||||
int KMSGSUBTYPEARKTENCENTDOCFROMMINIAPP = 1;
|
||||
int KMSGSUBTYPEARKTENCENTDOCFROMPLUSPANEL = 2;
|
||||
int KMSGSUBTYPEEMOTICON = 15;
|
||||
int KMSGSUBTYPEFILEAPP = 11;
|
||||
int KMSGSUBTYPEFILEAUDIO = 3;
|
||||
int KMSGSUBTYPEFILEDOC = 4;
|
||||
int KMSGSUBTYPEFILEEXCEL = 6;
|
||||
int KMSGSUBTYPEFILEFOLDER = 13;
|
||||
int KMSGSUBTYPEFILEHTML = 10;
|
||||
int KMSGSUBTYPEFILEIPA = 14;
|
||||
int KMSGSUBTYPEFILENORMAL = 0;
|
||||
int KMSGSUBTYPEFILEPDF = 7;
|
||||
int KMSGSUBTYPEFILEPIC = 1;
|
||||
int KMSGSUBTYPEFILEPPT = 5;
|
||||
int KMSGSUBTYPEFILEPSD = 12;
|
||||
int KMSGSUBTYPEFILETXT = 8;
|
||||
int KMSGSUBTYPEFILEVIDEO = 2;
|
||||
int KMSGSUBTYPEFILEZIP = 9;
|
||||
int KMSGSUBTYPELINK = 5;
|
||||
int KMSGSUBTYPEMARKETFACE = 1;
|
||||
int KMSGSUBTYPEMIXEMOTICON = 7;
|
||||
int KMSGSUBTYPEMIXFACE = 3;
|
||||
int KMSGSUBTYPEMIXMARKETFACE = 2;
|
||||
int KMSGSUBTYPEMIXPIC = 1;
|
||||
int KMSGSUBTYPEMIXREPLY = 4;
|
||||
int KMSGSUBTYPEMIXTEXT = 0;
|
||||
int KMSGSUBTYPETENCENTDOC = 6;
|
||||
int KMSGTYPEARKSTRUCT = 11;
|
||||
int KMSGTYPEFACEBUBBLE = 24;
|
||||
int KMSGTYPEFILE = 3;
|
||||
int KMSGTYPEGIFT = 14;
|
||||
int KMSGTYPEGIPHY = 13;
|
||||
int KMSGTYPEGRAYTIPS = 5;
|
||||
int KMSGTYPEMIX = 2;
|
||||
int KMSGTYPEMULTIMSGFORWARD = 8;
|
||||
int KMSGTYPENULL = 1;
|
||||
int KMSGTYPEONLINEFILE = 21;
|
||||
int KMSGTYPEONLINEFOLDER = 27;
|
||||
int KMSGTYPEPROLOGUE = 29;
|
||||
int KMSGTYPEPTT = 6;
|
||||
int KMSGTYPEREPLY = 9;
|
||||
int KMSGTYPESHARELOCATION = 25;
|
||||
int KMSGTYPESTRUCT = 4;
|
||||
int KMSGTYPESTRUCTLONGMSG = 12;
|
||||
int KMSGTYPETEXTGIFT = 15;
|
||||
int KMSGTYPEUNKNOWN = 0;
|
||||
int KMSGTYPEVIDEO = 7;
|
||||
int KMSGTYPEWALLET = 10;
|
||||
int KNEEDCONFIRMGROUPMANNOUNCEATALLMSGTYPEINMSGBOX = 2005;
|
||||
int KNOTPASSTHROUGHEVENTTYPEUPPERBOUNDARY = 9999;
|
||||
int KPTTFORMATTYPEAMR = 0;
|
||||
int KPTTFORMATTYPESILK = 1;
|
||||
int KPTTTRANSLATESTATUSFAIL = 3;
|
||||
int KPTTTRANSLATESTATUSSUC = 2;
|
||||
int KPTTTRANSLATESTATUSTRANSLATING = 1;
|
||||
int KPTTTRANSLATESTATUSUNKNOWN = 0;
|
||||
int KPTTVIPLEVELTYPENONE = 0;
|
||||
int KPTTVIPLEVELTYPEQQVIP = 0;
|
||||
int KPTTVIPLEVELTYPESVIP = 0;
|
||||
int KPTTVOICECHANGETYPEBEASTMACHINE = 7;
|
||||
int KPTTVOICECHANGETYPEBOY = 2;
|
||||
int KPTTVOICECHANGETYPECATCHCOLD = 13;
|
||||
int KPTTVOICECHANGETYPEECHO = 5;
|
||||
int KPTTVOICECHANGETYPEFATGUY = 16;
|
||||
int KPTTVOICECHANGETYPEFLASHING = 9;
|
||||
int KPTTVOICECHANGETYPEGIRL = 1;
|
||||
int KPTTVOICECHANGETYPEHORRIBLE = 3;
|
||||
int KPTTVOICECHANGETYPEKINDERGARTEN = 6;
|
||||
int KPTTVOICECHANGETYPEMEDAROT = 15;
|
||||
int KPTTVOICECHANGETYPENONE = 0;
|
||||
int KPTTVOICECHANGETYPEOPTIMUSPRIME = 8;
|
||||
int KPTTVOICECHANGETYPEOUTOFDATE = 14;
|
||||
int KPTTVOICECHANGETYPEPAPI = 11;
|
||||
int KPTTVOICECHANGETYPEQUICK = 4;
|
||||
int KPTTVOICECHANGETYPESTUTTER = 10;
|
||||
int KPTTVOICECHANGETYPETRAPPEDBEAST = 12;
|
||||
int KPTTVOICETYPEINTERCOM = 1;
|
||||
int KPTTVOICETYPESOUNDRECORD = 2;
|
||||
int KPTTVOICETYPEUNKNOW = 0;
|
||||
int KPTTVOICETYPEVOICECHANGE = 3;
|
||||
int KPUBLICACCOUNTTIANSHUHIGHLIGHTWORDTYPEINMSGBOX = 1010;
|
||||
int KREPLYABSELEMTYPEFACE = 2;
|
||||
int KREPLYABSELEMTYPEPIC = 3;
|
||||
int KREPLYABSELEMTYPETEXT = 1;
|
||||
int KREPLYABSELEMTYPEUNKNOWN = 0;
|
||||
int KREPLYATMEMSGTYPEINMSGBOX = 1002;
|
||||
int KRMDOWNTYPEORIG = 1;
|
||||
int KRMDOWNTYPETHUMB = 2;
|
||||
int KRMDOWNTYPEUNKNOWN = 0;
|
||||
int KRMFILETHUMBSIZE128 = 128;
|
||||
int KRMFILETHUMBSIZE320 = 320;
|
||||
int KRMFILETHUMBSIZE384 = 384;
|
||||
int KRMFILETHUMBSIZE750 = 750;
|
||||
int KRMPICAIOTHUMBSIZE = 0;
|
||||
int KRMPICTHUMBSIZE198 = 198;
|
||||
int KRMPICTHUMBSIZE720 = 720;
|
||||
int KRMPICTYPEBMP = 3;
|
||||
int KRMPICTYPECHECKOTHER = 900;
|
||||
int KRMPICTYPEGIF = 2;
|
||||
int KRMPICTYPEJPG = 0;
|
||||
int KRMPICTYPENEWPICAPNG = 2001;
|
||||
int KRMPICTYPENEWPICBMP = 1005;
|
||||
int KRMPICTYPENEWPICGIF = 2000;
|
||||
int KRMPICTYPENEWPICJPEG = 1000;
|
||||
int KRMPICTYPENEWPICPNG = 1001;
|
||||
int KRMPICTYPENEWPICPROGERSSIVJPEG = 1003;
|
||||
int KRMPICTYPENEWPICSHARPP = 1004;
|
||||
int KRMPICTYPENEWPICWEBP = 1002;
|
||||
int KRMPICTYPEPNG = 1;
|
||||
int KRMPICTYPEUNKOWN = 0;
|
||||
int KRMTHUMBSIZEZERO = 0;
|
||||
int KRMTRNASFERSTATUSDOWNLOADING = 3;
|
||||
int KRMTRNASFERSTATUSFAIL = 5;
|
||||
int KRMTRNASFERSTATUSINIT = 1;
|
||||
int KRMTRNASFERSTATUSSUC = 4;
|
||||
int KRMTRNASFERSTATUSUNKOW = 0;
|
||||
int KRMTRNASFERSTATUSUPLOADING = 2;
|
||||
int KRMTRNASFERSTATUSUSERCANCEL = 6;
|
||||
int KSEEKINGPARTNERFLAGSEEKING = 1;
|
||||
int KSEEKINGPARTNERFLAGUNKNOWN = 0;
|
||||
int KSENDSTATUSFAILED = 0;
|
||||
int KSENDSTATUSSENDING = 1;
|
||||
int KSENDSTATUSSUCCESS = 2;
|
||||
int KSENDSTATUSSUCCESSNOSEQ = 3;
|
||||
int KSENDTYPEDROPPED = 6;
|
||||
int KSENDTYPELOCAL = 3;
|
||||
int KSENDTYPEOTHERDEVICE = 2;
|
||||
int KSENDTYPERECV = 0;
|
||||
int KSENDTYPESELF = 1;
|
||||
int KSENDTYPESELFFORWARD = 4;
|
||||
int KSENDTYPESELFMULTIFORWARD = 5;
|
||||
int KSESSIONTYPEADDRESSBOOK = 5;
|
||||
int KSESSIONTYPEC2C = 1;
|
||||
int KSESSIONTYPEDISC = 3;
|
||||
int KSESSIONTYPEFAV = 41;
|
||||
int KSESSIONTYPEGROUP = 2;
|
||||
int KSESSIONTYPEGROUPBLESS = 52;
|
||||
int KSESSIONTYPEGUILD = 4;
|
||||
int KSESSIONTYPEGUILDMETA = 16;
|
||||
int KSESSIONTYPENEARBYPRO = 54;
|
||||
int KSESSIONTYPEQQNOTIFY = 51;
|
||||
int KSESSIONTYPERELATEACCOUNT = 50;
|
||||
int KSESSIONTYPESERVICEASSISTANT = 19;
|
||||
int KSESSIONTYPESUBSCRIBEFOLDER = 30;
|
||||
int KSESSIONTYPETYPEBUDDYNOTIFY = 7;
|
||||
int KSESSIONTYPETYPEGROUPHELPER = 9;
|
||||
int KSESSIONTYPETYPEGROUPNOTIFY = 8;
|
||||
int KSESSIONTYPEUNKNOWN = 0;
|
||||
int KSESSIONTYPEWEIYUN = 40;
|
||||
int KSPECIALCAREMSGTYPEINMSGBOX = 1006;
|
||||
int KSPECIFIEDREDENVELOPEATMEMSGTYPEINMSGBOX = 1004;
|
||||
int KSPECIFIEDREDENVELOPEATONEMSGTYPEINMSGBOX = 1003;
|
||||
int KTENCENTDOCTYPEADDON = 110;
|
||||
int KTENCENTDOCTYPEDOC = 0;
|
||||
int KTENCENTDOCTYPEDRAWING = 89;
|
||||
int KTENCENTDOCTYPEDRIVE = 101;
|
||||
int KTENCENTDOCTYPEFILE = 100;
|
||||
int KTENCENTDOCTYPEFLOWCHART = 91;
|
||||
int KTENCENTDOCTYPEFOLDER = 3;
|
||||
int KTENCENTDOCTYPEFORM = 2;
|
||||
int KTENCENTDOCTYPEMIND = 90;
|
||||
int KTENCENTDOCTYPENOTES = 5;
|
||||
int KTENCENTDOCTYPEPDF = 6;
|
||||
int KTENCENTDOCTYPEPROGRAM = 7;
|
||||
int KTENCENTDOCTYPESHEET = 1;
|
||||
int KTENCENTDOCTYPESLIDE = 4;
|
||||
int KTENCENTDOCTYPESMARTCANVAS = 8;
|
||||
int KTENCENTDOCTYPESMARTSHEET = 9;
|
||||
int KTENCENTDOCTYPESPEECH = 102;
|
||||
int KTENCENTDOCTYPEUNKNOWN = 10;
|
||||
int KTOFURECORDMSG = 23;
|
||||
int KTOPMSGTYPETASK = 1;
|
||||
int KTOPMSGTYPEUNKNOWN = 0;
|
||||
int KTRIGGERTYPEAUTO = 1;
|
||||
int KTRIGGERTYPEMANUAL = 0;
|
||||
int KUNKNOWN = 0;
|
||||
int KUNKNOWNTYPEINMSGBOX = 0;
|
||||
int KUNREADCNTUPTYPEALLDIRECTSESSION = 4;
|
||||
int KUNREADCNTUPTYPEALLFEEDSINGUILD = 6;
|
||||
int KUNREADCNTUPTYPEALLGUILD = 3;
|
||||
int KUNREADCNTUPTYPECATEGORY = 5;
|
||||
int KUNREADCNTUPTYPECHANNEL = 1;
|
||||
int KUNREADCNTUPTYPECONTACT = 0;
|
||||
int KUNREADCNTUPTYPEGUILD = 2;
|
||||
int KUNREADCNTUPTYPEGUILDGROUP = 7;
|
||||
int KUNREADSHOWTTYPEGRAYPOINT = 2;
|
||||
int KUNREADSHOWTYPEREDPOINT = 1;
|
||||
int KUNREADSHOWTYPESMALLGRAYPOINT = 4;
|
||||
int KUNREADSHOWTYPESMALLREDPOINT = 3;
|
||||
int KUNREADSHOWTYPEUNKNOWN = 0;
|
||||
int KVASGIFTCOINTYPECOIN = 0;
|
||||
int KVASGIFTCOINTYPEMARKETCOIN = 1;
|
||||
int KYOLOGAMERESULTMSG = 18;
|
||||
int PIC_800_RECOMMENDED = 7;
|
||||
int PIC_AIGC_EMOJI = 14;
|
||||
int PIC_ALBUM_GIF = 11;
|
||||
int PIC_COMMERCIAL_ADVERTISING = 9;
|
||||
int PIC_FIND = 10;
|
||||
int PIC_HOT = 2;
|
||||
int PIC_HOT_EMOJI = 13;
|
||||
int PIC_NORMAL = 0;
|
||||
int PIC_PK = 3;
|
||||
int PIC_QQZONE = 5;
|
||||
int PIC_SELFIE_GIF = 8;
|
||||
int PIC_SEND_FROM_TAB_SEARCH_BOX = 12;
|
||||
int PIC_USER = 1;
|
||||
int PIC_WISDOM_FIGURE = 4;
|
||||
int REPLYORIGINALMSGSTATEHASRECALL = 1;
|
||||
int REPLYORIGINALMSGSTATEUNKNOWN = 0;
|
||||
int SHARELOCATIONELEMSUBTYPENORMAL = 1;
|
||||
int SHARELOCATIONELEMSUBTYPEUNKNOWN = 0;
|
||||
int TEXTELEMENTSUBTYPELINK = 1;
|
||||
int TEXTELEMENTSUBTYPETENCENTDOC = 2;
|
||||
int TEXTELEMENTSUBTYPEUNKNOWN = 0;
|
||||
```
|
24
docs/develop/参与开发.md
Normal file
24
docs/develop/参与开发.md
Normal file
@@ -0,0 +1,24 @@
|
||||
# 前排提示
|
||||
由于Core未处于开源,非组织人员无法参与Core开发,此处为Core开发提示
|
||||
|
||||
# 准备工具
|
||||
frida ida-pro jadx x64dbg ce 内部调试脚本
|
||||
|
||||
## ida-pro
|
||||
1. 用于快速分析入参和返回类型
|
||||
2. 通过静态QLog推测语义
|
||||
3. 提取Listener与Service (常用)
|
||||
## frida
|
||||
1. 用于动态获取QLog推测语义
|
||||
2. 捕捉Native函数 实际入参与数据 分析中间流程
|
||||
|
||||
## jadx
|
||||
1. 通过其它平台实现 静态获取QLog推测语义
|
||||
2. 提供部分未调用代码 参考
|
||||
|
||||
## x64dbg
|
||||
1. 验证IDA的Hook点
|
||||
|
||||
## 内部脚本
|
||||
1. 提取Listener与Service (不调用无类型 不推荐)
|
||||
2. 获取NT调用流程
|
14
package.json
14
package.json
@@ -2,7 +2,7 @@
|
||||
"name": "napcat",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"version": "1.4.4",
|
||||
"version": "1.5.8",
|
||||
"scripts": {
|
||||
"watch:dev": "vite --mode development",
|
||||
"watch:prod": "vite --mode production",
|
||||
@@ -18,7 +18,13 @@
|
||||
"depend": "cd dist && npm install --omit=dev"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.24.7",
|
||||
"@babel/preset-typescript": "^7.24.7",
|
||||
"vite-plugin-babel": "^1.2.0",
|
||||
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
||||
"@babel/plugin-proposal-decorators": "^7.24.7",
|
||||
"@log4js-node/log4js-api": "^1.0.2",
|
||||
"@protobuf-ts/plugin": "^2.9.4",
|
||||
"@rollup/plugin-node-resolve": "^15.2.3",
|
||||
"@rollup/plugin-typescript": "^11.1.6",
|
||||
"@types/cors": "^2.8.17",
|
||||
@@ -43,11 +49,11 @@
|
||||
"vite": "^5.2.6",
|
||||
"vite-plugin-cp": "^4.0.8",
|
||||
"vite-plugin-dts": "^3.8.2",
|
||||
"vite-tsconfig-paths": "^4.3.2",
|
||||
"@protobuf-ts/plugin": "^2.9.4"
|
||||
"vite-tsconfig-paths": "^4.3.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"ajv": "^8.13.0",
|
||||
"chalk": "^5.3.0",
|
||||
"commander": "^12.0.0",
|
||||
"cors": "^2.8.5",
|
||||
"express": "^5.0.0-beta.2",
|
||||
@@ -60,7 +66,7 @@
|
||||
"qrcode-terminal": "^0.12.0",
|
||||
"silk-wasm": "^3.3.4",
|
||||
"sqlite3": "^5.1.7",
|
||||
"uuid": "^9.0.1",
|
||||
"uuid": "^10.0.0",
|
||||
"ws": "^8.16.0"
|
||||
}
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { sleep } from '@/common/utils/helper';
|
||||
|
||||
import { logError } from './log';
|
||||
type AsyncQueueTask = (() => void) | (()=>Promise<void>);
|
||||
|
||||
|
||||
@@ -26,7 +26,8 @@ export class AsyncQueue {
|
||||
await taskRet;
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
// console.error(e);
|
||||
logError(e);
|
||||
}
|
||||
this.tasks.shift();
|
||||
await sleep(100);
|
||||
|
@@ -1,99 +1,182 @@
|
||||
import { randomUUID } from "crypto";
|
||||
export enum NTEventMode {
|
||||
Once = 1,
|
||||
Twice = 2
|
||||
}
|
||||
export interface NTEventType<U extends (...args: any[]) => any> {
|
||||
EventName: string,
|
||||
EventFunction: U,
|
||||
ListenerName: string,
|
||||
ListenerFunction: Function
|
||||
}
|
||||
interface Internal_MapKey {
|
||||
mode: NTEventMode,
|
||||
timeout: number,
|
||||
createtime: number,
|
||||
func: Function
|
||||
}
|
||||
export class NTEvent<T extends (...args: any[]) => any, R = any> {
|
||||
EventData: NTEventType<T>;
|
||||
EventTask: Map<string, Internal_MapKey> = new Map<string, Internal_MapKey>();
|
||||
constructor(params: NTEventType<T>) {
|
||||
params.ListenerFunction = this.DispatcherListener.bind(this);
|
||||
this.EventData = params;
|
||||
this.EventData.EventFunction = params.EventFunction.bind(this) as any;
|
||||
}
|
||||
async DispatcherListener(...args: any[]) {
|
||||
console.log(...args);
|
||||
this.EventTask.forEach((task, uuid) => {
|
||||
if (task.createtime + task.timeout > Date.now()) {
|
||||
this.EventTask.delete(uuid);
|
||||
return;
|
||||
}
|
||||
task.func(...args);
|
||||
})
|
||||
}
|
||||
async CallTwiceEvent(timeout: number = 3000, ...args: Parameters<T>) {
|
||||
return new Promise<R>((resolve, reject) => {
|
||||
const id = randomUUID();
|
||||
let complete = 0;
|
||||
let retData: R | undefined = undefined;
|
||||
let databack = () => {
|
||||
if (!complete) {
|
||||
this.EventTask.delete(id);
|
||||
reject(new Error('NTEvent EventName:' + this.EventData.EventName + ' EventListener:' + this.EventData.ListenerName + ' timeout'));
|
||||
} else {
|
||||
resolve(retData as R);
|
||||
}
|
||||
}
|
||||
|
||||
let Timeouter = setTimeout(databack, timeout);
|
||||
|
||||
this.EventTask.set(id, {
|
||||
mode: NTEventMode.Once,
|
||||
timeout: timeout,
|
||||
createtime: Date.now(),
|
||||
func: (...args: any[]) => {
|
||||
complete++;
|
||||
retData = args as R;
|
||||
if (complete == 2) {
|
||||
clearTimeout(Timeouter);
|
||||
databack();
|
||||
}
|
||||
}
|
||||
});
|
||||
this.EventData.EventFunction(...args);
|
||||
});
|
||||
}
|
||||
|
||||
async CallOnceEvent(timeout: number = 3000, ...args: Parameters<T>) {
|
||||
return new Promise<R>((resolve, reject) => {
|
||||
const id = randomUUID();
|
||||
let complete = false;
|
||||
let retData: R | undefined = undefined;
|
||||
let databack = () => {
|
||||
if (!complete) {
|
||||
this.EventTask.delete(id);
|
||||
reject(new Error('NTEvent EventName:' + this.EventData.EventName + ' EventListener:' + this.EventData.ListenerName + ' timeout'));
|
||||
} else {
|
||||
resolve(retData as R);
|
||||
}
|
||||
}
|
||||
let Timeouter = setTimeout(databack, timeout);
|
||||
|
||||
this.EventTask.set(id, {
|
||||
mode: NTEventMode.Once,
|
||||
timeout: timeout,
|
||||
createtime: Date.now(),
|
||||
func: (...args: any[]) => {
|
||||
clearTimeout(Timeouter);
|
||||
complete = true;
|
||||
retData = args as R;
|
||||
databack();
|
||||
}
|
||||
});
|
||||
this.EventData.EventFunction(...args);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
import { NodeIKernelMsgListener } from '@/core';
|
||||
import { NodeIQQNTWrapperSession } from '@/core/wrapper';
|
||||
import { randomUUID } from 'crypto';
|
||||
|
||||
interface Internal_MapKey {
|
||||
timeout: number,
|
||||
createtime: number,
|
||||
func: (...arg: any[]) => any,
|
||||
}
|
||||
|
||||
export class ListenerClassBase {
|
||||
[key: string]: string;
|
||||
}
|
||||
|
||||
export interface ListenerIBase {
|
||||
// eslint-disable-next-line @typescript-eslint/no-misused-new
|
||||
new(listener: any): ListenerClassBase;
|
||||
}
|
||||
|
||||
export class NTEventWrapper {
|
||||
|
||||
private ListenerMap: { [key: string]: ListenerIBase } | undefined;//ListenerName-Unique -> Listener构造函数
|
||||
private WrapperSession: NodeIQQNTWrapperSession | undefined;//WrapperSession
|
||||
private ListenerManger: Map<string, ListenerClassBase> = new Map<string, ListenerClassBase>(); //ListenerName-Unique -> Listener实例
|
||||
private EventTask = new Map<string, Map<string, Map<string, Internal_MapKey>>>();//tasks ListenerMainName -> ListenerSubName-> uuid -> {timeout,createtime,func}
|
||||
constructor() {
|
||||
|
||||
}
|
||||
createProxyDispatch(ListenerMainName: string) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
||||
const current = this;
|
||||
return new Proxy({}, {
|
||||
get(target: any, prop: any, receiver: any) {
|
||||
// console.log('get', prop, typeof target[prop]);
|
||||
if (typeof target[prop] === 'undefined') {
|
||||
// 如果方法不存在,返回一个函数,这个函数调用existentMethod
|
||||
return (...args: any[]) => {
|
||||
current.DispatcherListener.apply(current, [ListenerMainName, prop, ...args]).then();
|
||||
};
|
||||
}
|
||||
// 如果方法存在,正常返回
|
||||
return Reflect.get(target, prop, receiver);
|
||||
}
|
||||
});
|
||||
}
|
||||
init({ ListenerMap, WrapperSession }: { ListenerMap: { [key: string]: typeof ListenerClassBase }, WrapperSession: NodeIQQNTWrapperSession }) {
|
||||
this.ListenerMap = ListenerMap;
|
||||
this.WrapperSession = WrapperSession;
|
||||
}
|
||||
CreatEventFunction<T extends (...args: any) => any>(eventName: string): T | undefined {
|
||||
const eventNameArr = eventName.split('/');
|
||||
type eventType = {
|
||||
[key: string]: () => { [key: string]: (...params: Parameters<T>) => Promise<ReturnType<T>> }
|
||||
}
|
||||
if (eventNameArr.length > 1) {
|
||||
const serviceName = 'get' + eventNameArr[0].replace('NodeIKernel', '');
|
||||
const eventName = eventNameArr[1];
|
||||
//getNodeIKernelGroupListener,GroupService
|
||||
//console.log('2', eventName);
|
||||
const services = (this.WrapperSession as unknown as eventType)[serviceName]();
|
||||
let event = services[eventName];
|
||||
//重新绑定this
|
||||
event = event.bind(services);
|
||||
if (event) {
|
||||
return event as T;
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
|
||||
}
|
||||
CreatListenerFunction<T>(listenerMainName: string, uniqueCode: string = ''): T {
|
||||
const ListenerType = this.ListenerMap![listenerMainName];
|
||||
let Listener = this.ListenerManger.get(listenerMainName + uniqueCode);
|
||||
if (!Listener && ListenerType) {
|
||||
Listener = new ListenerType(this.createProxyDispatch(listenerMainName));
|
||||
const ServiceSubName = listenerMainName.match(/^NodeIKernel(.*?)Listener$/)![1];
|
||||
const Service = 'NodeIKernel' + ServiceSubName + 'Service/addKernel' + ServiceSubName + 'Listener';
|
||||
const addfunc = this.CreatEventFunction<(listener: T) => number>(Service);
|
||||
addfunc!(Listener as T);
|
||||
//console.log(addfunc!(Listener as T));
|
||||
this.ListenerManger.set(listenerMainName + uniqueCode, Listener);
|
||||
}
|
||||
return Listener as T;
|
||||
}
|
||||
//统一回调清理事件
|
||||
async DispatcherListener(ListenerMainName: string, ListenerSubName: string, ...args: any[]) {
|
||||
//console.log(ListenerMainName, this.EventTask.get(ListenerMainName), ListenerSubName, this.EventTask.get(ListenerMainName)?.get(ListenerSubName));
|
||||
this.EventTask.get(ListenerMainName)?.get(ListenerSubName)?.forEach((task, uuid) => {
|
||||
//console.log(task.func, uuid, task.createtime, task.timeout);
|
||||
if (task.createtime + task.timeout < Date.now()) {
|
||||
this.EventTask.get(ListenerMainName)?.get(ListenerSubName)?.delete(uuid);
|
||||
return;
|
||||
}
|
||||
task.func(...args);
|
||||
});
|
||||
}
|
||||
async CallNoListenerEvent<EventType extends (...args: any[]) => Promise<any>,>(EventName = '', timeout: number = 3000, ...args: Parameters<EventType>) {
|
||||
return new Promise<Awaited<ReturnType<EventType>>>(async (resolve, reject) => {
|
||||
const EventFunc = this.CreatEventFunction<EventType>(EventName);
|
||||
let complete = false;
|
||||
const Timeouter = setTimeout(() => {
|
||||
if (!complete) {
|
||||
reject(new Error('NTEvent EventName:' + EventName + ' timeout'));
|
||||
}
|
||||
}, timeout);
|
||||
const retData = await EventFunc!(...args);
|
||||
complete = true;
|
||||
resolve(retData);
|
||||
});
|
||||
}
|
||||
async CallNormalEvent<EventType extends (...args: any[]) => Promise<any>, ListenerType extends (...args: any[]) => void>(EventName = '', ListenerName = '', waitTimes = 1, timeout: number = 3000, ...args: Parameters<EventType>) {
|
||||
return new Promise<[EventRet: Awaited<ReturnType<EventType>>, ...Parameters<ListenerType>]>(async (resolve, reject) => {
|
||||
const id = randomUUID();
|
||||
let complete = 0;
|
||||
let retData: Parameters<ListenerType> | undefined = undefined;
|
||||
let retEvent: any = {};
|
||||
const databack = () => {
|
||||
if (complete < waitTimes) {
|
||||
reject(new Error('NTEvent EventName:' + EventName + ' ListenerName:' + ListenerName + ' timeout'));
|
||||
} else {
|
||||
resolve([retEvent as Awaited<ReturnType<EventType>>, ...retData!]);
|
||||
}
|
||||
};
|
||||
const Timeouter = setTimeout(databack, timeout);
|
||||
|
||||
const ListenerNameList = ListenerName.split('/');
|
||||
const ListenerMainName = ListenerNameList[0];
|
||||
const ListenerSubName = ListenerNameList[1];
|
||||
const eventCallbak = {
|
||||
timeout: timeout,
|
||||
createtime: Date.now(),
|
||||
func: (...args: any[]) => {
|
||||
complete++;
|
||||
//console.log('func', ...args);
|
||||
retData = args as Parameters<ListenerType>;
|
||||
if (complete >= waitTimes) {
|
||||
clearTimeout(Timeouter);
|
||||
databack();
|
||||
}
|
||||
}
|
||||
};
|
||||
if (!this.EventTask.get(ListenerMainName)) {
|
||||
this.EventTask.set(ListenerMainName, new Map());
|
||||
}
|
||||
if (!(this.EventTask.get(ListenerMainName)?.get(ListenerSubName))) {
|
||||
this.EventTask.get(ListenerMainName)?.set(ListenerSubName, new Map());
|
||||
}
|
||||
this.EventTask.get(ListenerMainName)?.get(ListenerSubName)?.set(id, eventCallbak);
|
||||
this.CreatListenerFunction(ListenerMainName);
|
||||
const EventFunc = this.CreatEventFunction<EventType>(EventName);
|
||||
//console.log("测试打点", args);
|
||||
retEvent = await EventFunc!(...(args as any[]));
|
||||
});
|
||||
}
|
||||
}
|
||||
export const NTEventDispatch = new NTEventWrapper();
|
||||
|
||||
// 示例代码 快速创建事件
|
||||
// let NTEvent = new NTEventWrapper();
|
||||
// let TestEvent = NTEvent.CreatEventFunction<(force: boolean) => Promise<Number>>('NodeIKernelProfileLikeService/GetTest');
|
||||
// if (TestEvent) {
|
||||
// TestEvent(true);
|
||||
// }
|
||||
|
||||
// 示例代码 快速创建监听Listener类
|
||||
// let NTEvent = new NTEventWrapper();
|
||||
// NTEvent.CreatListenerFunction<NodeIKernelMsgListener>('NodeIKernelMsgListener', 'core')
|
||||
|
||||
|
||||
// 调用接口
|
||||
//let NTEvent = new NTEventWrapper();
|
||||
//let ret = await NTEvent.CallNormalEvent<(force: boolean) => Promise<Number>, (data1: string, data2: number) => void>('NodeIKernelProfileLikeService/GetTest', 'NodeIKernelMsgListener/onAddSendMsg', 1, 3000, true);
|
||||
|
||||
// 注册监听 解除监听
|
||||
// NTEventDispatch.RigisterListener('NodeIKernelMsgListener/onAddSendMsg','core',cb);
|
||||
// NTEventDispatch.UnRigisterListener('NodeIKernelMsgListener/onAddSendMsg','core');
|
||||
|
||||
// let GetTest = NTEventDispatch.CreatEvent('NodeIKernelProfileLikeService/GetTest','NodeIKernelMsgListener/onAddSendMsg',Mode);
|
||||
// GetTest('test');
|
||||
|
||||
// always模式
|
||||
// NTEventDispatch.CreatEvent('NodeIKernelProfileLikeService/GetTest','NodeIKernelMsgListener/onAddSendMsg',Mode,(...args:any[])=>{ console.log(args) });
|
@@ -1,145 +1,145 @@
|
||||
import { logError, logDebug } from "@/common/utils/log";
|
||||
|
||||
type group_id = number;
|
||||
type user_id = number;
|
||||
|
||||
class cacheNode<T> {
|
||||
value: T;
|
||||
groupId: group_id;
|
||||
userId: user_id;
|
||||
prev: cacheNode<T> | null;
|
||||
next: cacheNode<T> | null;
|
||||
timestamp: number;
|
||||
|
||||
constructor(groupId: group_id, userId: user_id, value: T) {
|
||||
this.groupId = groupId;
|
||||
this.userId = userId;
|
||||
this.value = value;
|
||||
this.prev = null;
|
||||
this.next = null;
|
||||
this.timestamp = Date.now();
|
||||
}
|
||||
}
|
||||
|
||||
type cache<T> = { [key: group_id]: { [key: user_id]: cacheNode<T> } };
|
||||
class LRU<T> {
|
||||
private maxAge: number;
|
||||
private maxSize: number;
|
||||
private currentSize: number;
|
||||
private cache: cache<T>;
|
||||
private head: cacheNode<T> | null = null;
|
||||
private tail: cacheNode<T> | null = null;
|
||||
private onFuncs: ((node: cacheNode<T>) => void)[] = [];
|
||||
|
||||
constructor(maxAge: number = 2e4, maxSize: number = 5e3) {
|
||||
this.maxAge = maxAge;
|
||||
this.maxSize = maxSize;
|
||||
this.cache = Object.create(null);
|
||||
this.currentSize = 0;
|
||||
|
||||
if (maxSize == 0) return;
|
||||
setInterval(() => this.removeExpired(), this.maxAge);
|
||||
}
|
||||
|
||||
// 移除LRU节点
|
||||
private removeLRUNode(node: cacheNode<T>) {
|
||||
logDebug(
|
||||
"removeLRUNode",
|
||||
node.groupId,
|
||||
node.userId,
|
||||
node.value,
|
||||
this.currentSize
|
||||
);
|
||||
node.prev = node.next = null;
|
||||
delete this.cache[node.groupId][node.userId];
|
||||
this.removeNode(node);
|
||||
this.onFuncs.forEach((func) => func(node));
|
||||
this.currentSize--;
|
||||
}
|
||||
|
||||
public on(func: (node: cacheNode<T>) => void) {
|
||||
this.onFuncs.push(func);
|
||||
}
|
||||
|
||||
private removeExpired() {
|
||||
const now = Date.now();
|
||||
let current = this.tail;
|
||||
const nodesToRemove: cacheNode<T>[] = [];
|
||||
let removedCount = 0;
|
||||
|
||||
// 收集需要删除的节点
|
||||
while (current && now - current.timestamp > this.maxAge) {
|
||||
nodesToRemove.push(current);
|
||||
current = current.prev;
|
||||
removedCount++;
|
||||
if (removedCount >= 100) break;
|
||||
}
|
||||
|
||||
// 更新链表指向
|
||||
if (nodesToRemove.length > 0) {
|
||||
const newTail = nodesToRemove[nodesToRemove.length - 1].prev;
|
||||
if (newTail) {
|
||||
newTail.next = null;
|
||||
} else {
|
||||
this.head = null;
|
||||
}
|
||||
this.tail = newTail;
|
||||
}
|
||||
|
||||
nodesToRemove.forEach((node) => {
|
||||
node.prev = node.next = null;
|
||||
delete this.cache[node.groupId][node.userId];
|
||||
|
||||
this.currentSize--;
|
||||
this.onFuncs.forEach((func) => func(node));
|
||||
});
|
||||
}
|
||||
|
||||
private addNode(node: cacheNode<T>) {
|
||||
node.next = this.head;
|
||||
if (this.head) this.head.prev = node;
|
||||
if (!this.tail) this.tail = node;
|
||||
this.head = node;
|
||||
}
|
||||
|
||||
private removeNode(node: cacheNode<T>) {
|
||||
if (node.prev) node.prev.next = node.next;
|
||||
if (node.next) node.next.prev = node.prev;
|
||||
if (node === this.head) this.head = node.next;
|
||||
if (node === this.tail) this.tail = node.prev;
|
||||
}
|
||||
|
||||
private moveToHead(node: cacheNode<T>) {
|
||||
if (this.head === node) return;
|
||||
|
||||
this.removeNode(node);
|
||||
this.addNode(node);
|
||||
node.prev = null;
|
||||
}
|
||||
|
||||
public set(groupId: group_id, userId: user_id, value: T) {
|
||||
if (!this.cache[groupId]) {
|
||||
this.cache[groupId] = Object.create(null);
|
||||
}
|
||||
|
||||
const groupObject = this.cache[groupId];
|
||||
|
||||
if (groupObject[userId]) {
|
||||
const node = groupObject[userId];
|
||||
node.value = value;
|
||||
node.timestamp = Date.now();
|
||||
this.moveToHead(node);
|
||||
} else {
|
||||
const node = new cacheNode(groupId, userId, value);
|
||||
groupObject[userId] = node;
|
||||
this.currentSize++;
|
||||
this.addNode(node);
|
||||
if (this.currentSize > this.maxSize) {
|
||||
const tail = this.tail!;
|
||||
this.removeLRUNode(tail);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default LRU;
|
||||
import { logError, logDebug } from '@/common/utils/log';
|
||||
|
||||
type group_id = number;
|
||||
type user_id = number;
|
||||
|
||||
class cacheNode<T> {
|
||||
value: T;
|
||||
groupId: group_id;
|
||||
userId: user_id;
|
||||
prev: cacheNode<T> | null;
|
||||
next: cacheNode<T> | null;
|
||||
timestamp: number;
|
||||
|
||||
constructor(groupId: group_id, userId: user_id, value: T) {
|
||||
this.groupId = groupId;
|
||||
this.userId = userId;
|
||||
this.value = value;
|
||||
this.prev = null;
|
||||
this.next = null;
|
||||
this.timestamp = Date.now();
|
||||
}
|
||||
}
|
||||
|
||||
type cache<T> = { [key: group_id]: { [key: user_id]: cacheNode<T> } };
|
||||
class LRU<T> {
|
||||
private maxAge: number;
|
||||
private maxSize: number;
|
||||
private currentSize: number;
|
||||
private cache: cache<T>;
|
||||
private head: cacheNode<T> | null = null;
|
||||
private tail: cacheNode<T> | null = null;
|
||||
private onFuncs: ((node: cacheNode<T>) => void)[] = [];
|
||||
|
||||
constructor(maxAge: number = 2e4, maxSize: number = 5e3) {
|
||||
this.maxAge = maxAge;
|
||||
this.maxSize = maxSize;
|
||||
this.cache = Object.create(null);
|
||||
this.currentSize = 0;
|
||||
|
||||
if (maxSize == 0) return;
|
||||
setInterval(() => this.removeExpired(), this.maxAge);
|
||||
}
|
||||
|
||||
// 移除LRU节点
|
||||
private removeLRUNode(node: cacheNode<T>) {
|
||||
logDebug(
|
||||
'removeLRUNode',
|
||||
node.groupId,
|
||||
node.userId,
|
||||
node.value,
|
||||
this.currentSize
|
||||
);
|
||||
node.prev = node.next = null;
|
||||
delete this.cache[node.groupId][node.userId];
|
||||
this.removeNode(node);
|
||||
this.onFuncs.forEach((func) => func(node));
|
||||
this.currentSize--;
|
||||
}
|
||||
|
||||
public on(func: (node: cacheNode<T>) => void) {
|
||||
this.onFuncs.push(func);
|
||||
}
|
||||
|
||||
private removeExpired() {
|
||||
const now = Date.now();
|
||||
let current = this.tail;
|
||||
const nodesToRemove: cacheNode<T>[] = [];
|
||||
let removedCount = 0;
|
||||
|
||||
// 收集需要删除的节点
|
||||
while (current && now - current.timestamp > this.maxAge) {
|
||||
nodesToRemove.push(current);
|
||||
current = current.prev;
|
||||
removedCount++;
|
||||
if (removedCount >= 100) break;
|
||||
}
|
||||
|
||||
// 更新链表指向
|
||||
if (nodesToRemove.length > 0) {
|
||||
const newTail = nodesToRemove[nodesToRemove.length - 1].prev;
|
||||
if (newTail) {
|
||||
newTail.next = null;
|
||||
} else {
|
||||
this.head = null;
|
||||
}
|
||||
this.tail = newTail;
|
||||
}
|
||||
|
||||
nodesToRemove.forEach((node) => {
|
||||
node.prev = node.next = null;
|
||||
delete this.cache[node.groupId][node.userId];
|
||||
|
||||
this.currentSize--;
|
||||
this.onFuncs.forEach((func) => func(node));
|
||||
});
|
||||
}
|
||||
|
||||
private addNode(node: cacheNode<T>) {
|
||||
node.next = this.head;
|
||||
if (this.head) this.head.prev = node;
|
||||
if (!this.tail) this.tail = node;
|
||||
this.head = node;
|
||||
}
|
||||
|
||||
private removeNode(node: cacheNode<T>) {
|
||||
if (node.prev) node.prev.next = node.next;
|
||||
if (node.next) node.next.prev = node.prev;
|
||||
if (node === this.head) this.head = node.next;
|
||||
if (node === this.tail) this.tail = node.prev;
|
||||
}
|
||||
|
||||
private moveToHead(node: cacheNode<T>) {
|
||||
if (this.head === node) return;
|
||||
|
||||
this.removeNode(node);
|
||||
this.addNode(node);
|
||||
node.prev = null;
|
||||
}
|
||||
|
||||
public set(groupId: group_id, userId: user_id, value: T) {
|
||||
if (!this.cache[groupId]) {
|
||||
this.cache[groupId] = Object.create(null);
|
||||
}
|
||||
|
||||
const groupObject = this.cache[groupId];
|
||||
|
||||
if (groupObject[userId]) {
|
||||
const node = groupObject[userId];
|
||||
node.value = value;
|
||||
node.timestamp = Date.now();
|
||||
this.moveToHead(node);
|
||||
} else {
|
||||
const node = new cacheNode(groupId, userId, value);
|
||||
groupObject[userId] = node;
|
||||
this.currentSize++;
|
||||
this.addNode(node);
|
||||
if (this.currentSize > this.maxSize) {
|
||||
const tail = this.tail!;
|
||||
this.removeLRUNode(tail);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default LRU;
|
||||
|
53
src/common/utils/MessageUnique.ts
Normal file
53
src/common/utils/MessageUnique.ts
Normal file
@@ -0,0 +1,53 @@
|
||||
import crypto from 'crypto';
|
||||
|
||||
class LimitedHashTable<K, V> {
|
||||
private keyToValue: Map<K, V> = new Map();
|
||||
private valueToKey: Map<V, K> = new Map();
|
||||
private maxSize: number;
|
||||
private KeyQueneList: K[] = [];
|
||||
private ValueQueneList: V[] = [];
|
||||
constructor(maxSize: number) {
|
||||
this.maxSize = maxSize;
|
||||
}
|
||||
set(key: K, value: V): void {
|
||||
this.keyToValue.set(key, value);
|
||||
this.valueToKey.set(value, key);
|
||||
if (this.KeyQueneList.length >= this.maxSize || this.ValueQueneList.length >= this.maxSize) {
|
||||
this.KeyQueneList.shift();
|
||||
this.ValueQueneList.shift();
|
||||
}
|
||||
}
|
||||
|
||||
getValue(key: K): V | undefined {
|
||||
return this.keyToValue.get(key);
|
||||
}
|
||||
|
||||
getKey(value: V): K | undefined {
|
||||
return this.valueToKey.get(value);
|
||||
}
|
||||
|
||||
delete(key: K): void {
|
||||
const value = this.keyToValue.get(key);
|
||||
if (value !== undefined) {
|
||||
this.keyToValue.delete(key);
|
||||
this.valueToKey.delete(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class MessageUniqueWrapper {
|
||||
private msgIdMap: LimitedHashTable<number, string> = new LimitedHashTable(1000);
|
||||
createMsg(MsgId: string) {
|
||||
let ShortId = parseInt(crypto.createHash('sha1').update('2345').digest('hex').slice(0, 8), 16);
|
||||
this.msgIdMap.set(ShortId, MsgId);
|
||||
return ShortId;
|
||||
}
|
||||
getMsgIdByShortId(ShortId: number) {
|
||||
return this.msgIdMap.getValue(ShortId);
|
||||
}
|
||||
getShortIdByMsgId(MsgId: string) {
|
||||
return this.msgIdMap.getKey(MsgId);
|
||||
}
|
||||
}
|
||||
|
||||
export const MessageUnique = new MessageUniqueWrapper();
|
17
src/common/utils/Packet.ts
Normal file
17
src/common/utils/Packet.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
// 方案一 MiniApp发包方案
|
||||
// 前置条件: 处于GUI环境 存在MiniApp
|
||||
|
||||
import { NTQQSystemApi } from "@/core";
|
||||
|
||||
// 前排提示: 开发验证仅Win平台开展
|
||||
export class MiniAppUtil {
|
||||
static async RunMiniAppWithGUI() {
|
||||
//process.env.ELECTRON_RUN_AS_NODE = undefined;//没用还是得自己用cpp之类的语言写个程序转发参数
|
||||
return NTQQSystemApi.BootMiniApp(process.execPath, "miniapp://open/1007?url=https%3A%2F%2Fm.q.qq.com%2Fa%2Fs%2Fedd0a83d3b8afe233dfa07adaaf8033f%3Fscene%3D1007%26min_refer%3D10001");
|
||||
}
|
||||
}
|
||||
// 方案二 MiniApp发包方案 替代MiniApp方案
|
||||
// 前置条件: 无
|
||||
export class MojoMiniAppUtil{
|
||||
|
||||
}
|
@@ -2,6 +2,7 @@ import path from 'node:path';
|
||||
import fs from 'node:fs';
|
||||
import os from 'node:os';
|
||||
import { systemPlatform } from '@/common/utils/system';
|
||||
import { logError } from '@/common/utils/log';
|
||||
|
||||
export const exePath = process.execPath;
|
||||
|
||||
@@ -37,11 +38,11 @@ type QQVersionConfigInfo = {
|
||||
}
|
||||
|
||||
let _qqVersionConfigInfo: QQVersionConfigInfo = {
|
||||
'baseVersion': '9.9.9-23361',
|
||||
'curVersion': '9.9.9-23361',
|
||||
'baseVersion': '9.9.11-24568',
|
||||
'curVersion': '9.9.11-24568',
|
||||
'prevVersion': '',
|
||||
'onErrorVersions': [],
|
||||
'buildId': '23361'
|
||||
'buildId': '24568'
|
||||
};
|
||||
|
||||
if (fs.existsSync(configVersionInfoPath)) {
|
||||
@@ -49,12 +50,12 @@ if (fs.existsSync(configVersionInfoPath)) {
|
||||
const _ =JSON.parse(fs.readFileSync(configVersionInfoPath).toString());
|
||||
_qqVersionConfigInfo = Object.assign(_qqVersionConfigInfo, _);
|
||||
} catch (e) {
|
||||
console.error('Load QQ version config info failed, Use default version', e);
|
||||
logError('Load QQ version config info failed, Use default version', e);
|
||||
}
|
||||
}
|
||||
|
||||
export const qqVersionConfigInfo: QQVersionConfigInfo = _qqVersionConfigInfo;
|
||||
|
||||
//V1_WIN_NQ_9.9.11_24568_GW_B
|
||||
export const qqPkgInfo: QQPkgInfo = JSON.parse(fs.readFileSync(pkgInfoPath).toString());
|
||||
// platform_type: 3,
|
||||
// app_type: 4,
|
||||
@@ -64,9 +65,13 @@ export const qqPkgInfo: QQPkgInfo = JSON.parse(fs.readFileSync(pkgInfoPath).toSt
|
||||
// platVer: '10.0.26100',
|
||||
// clientVer: '9.9.9-23159',
|
||||
|
||||
let _appid: string = '537213803'; // 默认为 Windows 平台的 appid
|
||||
// Linux
|
||||
// app_version: '3.2.9-24568',
|
||||
// qua: 'V1_LNX_NQ_3.2.9_24568_GW_B',
|
||||
|
||||
let _appid: string = '537226369'; // 默认为 Windows 平台的 appid
|
||||
if (systemPlatform === 'linux') {
|
||||
_appid = '537213827';
|
||||
_appid = '537226441';
|
||||
}
|
||||
// todo: mac 平台的 appid
|
||||
export const appid = _appid;
|
||||
|
@@ -24,7 +24,7 @@ export async function encodeSilk(filePath: string) {
|
||||
const fileHeader = buffer.toString('hex', 0, bytesToRead);
|
||||
return fileHeader;
|
||||
} catch (err) {
|
||||
console.error('读取文件错误:', err);
|
||||
logError('读取文件错误:', err);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@@ -4,7 +4,6 @@ import fs from 'fs';
|
||||
import { dirname } from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = dirname(__filename);
|
||||
export function getModuleWithArchName(moduleName: string) {
|
||||
|
@@ -1,509 +1,449 @@
|
||||
import { ElementType, FileElement, PicElement, PttElement, RawMessage, VideoElement } from '../../core/src/entities';
|
||||
|
||||
import sqlite3 from 'sqlite3';
|
||||
import { log, logDebug, logError } from '@/common/utils/log';
|
||||
import { NTQQMsgApi } from '@/core';
|
||||
import LRU from "@/common/utils/LRUCache";
|
||||
|
||||
export interface IRember {
|
||||
last_sent_time: number;
|
||||
join_time: number;
|
||||
user_id: number;
|
||||
}
|
||||
|
||||
|
||||
type DBMsg = {
|
||||
id: number,
|
||||
shortId: number,
|
||||
longId: string,
|
||||
seq: number,
|
||||
peerUid: string,
|
||||
chatType: number,
|
||||
}
|
||||
|
||||
type DBFile = {
|
||||
name: string; // 文件名
|
||||
path: string;
|
||||
url: string;
|
||||
size: number;
|
||||
uuid: string;
|
||||
msgId: string;
|
||||
elementId: string;
|
||||
element: PicElement | VideoElement | FileElement | PttElement;
|
||||
elementType: ElementType.PIC | ElementType.VIDEO | ElementType.FILE | ElementType.PTT;
|
||||
}
|
||||
|
||||
|
||||
class DBUtilBase {
|
||||
protected db: sqlite3.Database | undefined;
|
||||
|
||||
async init(dbPath: string) {
|
||||
if (this.db) {
|
||||
return;
|
||||
}
|
||||
return new Promise<void>((resolve, reject) => {
|
||||
this.db = new sqlite3.Database(dbPath, sqlite3.OPEN_READWRITE | sqlite3.OPEN_CREATE, (err) => {
|
||||
if (err) {
|
||||
logError('Could not connect to database', err);
|
||||
reject(err);
|
||||
return;
|
||||
}
|
||||
this.createTable();
|
||||
resolve();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
protected createTable() {
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
|
||||
close() {
|
||||
this.db?.close();
|
||||
}
|
||||
}
|
||||
|
||||
class DBUtil extends DBUtilBase {
|
||||
private msgCache: Map<string | number, RawMessage> = new Map<string | number, RawMessage>();
|
||||
private globalMsgShortId = -2147483640;
|
||||
private groupIds: number[] = [];
|
||||
private LURCache = new LRU<number>();
|
||||
private LastSentCache = new (class {
|
||||
private cache: { gid: number; uid: number }[] = [];
|
||||
private maxSize: number;
|
||||
|
||||
constructor(maxSize: number = 5000) {
|
||||
this.maxSize = maxSize;
|
||||
}
|
||||
|
||||
get(gid: number, uid: number): boolean {
|
||||
const exists = this.cache.some(
|
||||
(entry) => entry.gid === gid && entry.uid === uid
|
||||
);
|
||||
if (!exists) {
|
||||
this.cache.push({ gid, uid });
|
||||
if (this.cache.length > this.maxSize) {
|
||||
this.cache.shift();
|
||||
}
|
||||
}
|
||||
|
||||
return exists;
|
||||
}
|
||||
})();
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
const interval = 1000 * 60 * 10; // 10分钟清理一次缓存
|
||||
setInterval(() => {
|
||||
logDebug('清理消息缓存');
|
||||
this.msgCache.forEach((msg, key) => {
|
||||
if ((Date.now() - parseInt(msg.msgTime) * 1000) > interval) {
|
||||
this.msgCache.delete(key);
|
||||
}
|
||||
});
|
||||
}, interval);
|
||||
}
|
||||
|
||||
async init(dbPath: string) {
|
||||
await super.init(dbPath);
|
||||
this.globalMsgShortId = await this.getCurrentMaxShortId();
|
||||
|
||||
|
||||
// 初始化群缓存列表
|
||||
this.db!.serialize(() => {
|
||||
const sql = `SELECT * FROM sqlite_master WHERE type='table'`;
|
||||
this.db!.all(sql, [], (err, rows: { name: string }[]) => {
|
||||
if (err) return logError(err);
|
||||
rows.forEach((row) => this.groupIds.push(parseInt(row.name)));
|
||||
//logDebug(`已加载 ${groupIds.length} 个群`);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
this.LURCache.on(async (node) => {
|
||||
const { value: time, groupId, userId } = node;
|
||||
|
||||
logDebug("插入发言时间", userId, groupId);
|
||||
await this.createGroupInfoTimeTableIfNotExist(groupId);
|
||||
|
||||
const method = await this.getDataSetMethod(groupId, userId);
|
||||
logDebug("插入发言时间方法判断", userId, groupId, method);
|
||||
|
||||
const sql =
|
||||
method == "update"
|
||||
? `UPDATE "${groupId}" SET last_sent_time = ? WHERE user_id = ?`
|
||||
: `INSERT INTO "${groupId}" (last_sent_time, user_id) VALUES (?, ?)`;
|
||||
|
||||
this.db!.all(sql, [time, userId], (err) => {
|
||||
if (err) {
|
||||
return logError("插入/更新发言时间失败", userId, groupId);
|
||||
}
|
||||
logDebug("插入/更新发言时间成功", userId, groupId);
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
async getDataSetMethod(groupId: number, userId: number) {
|
||||
// 缓存记录
|
||||
if (this.LastSentCache.get(groupId, userId)) {
|
||||
logDebug("缓存命中", userId, groupId);
|
||||
return "update";
|
||||
}
|
||||
|
||||
// 数据库判断
|
||||
return new Promise<"insert" | "update">((resolve, reject) => {
|
||||
this.db!.all(
|
||||
`SELECT * FROM "${groupId}" WHERE user_id = ?`,
|
||||
[userId],
|
||||
(err, rows) => {
|
||||
if (err) {
|
||||
logError("查询发言时间存在失败", userId, groupId, err);
|
||||
return logError("插入发言时间失败", userId, groupId, err);
|
||||
}
|
||||
|
||||
if (rows.length === 0) {
|
||||
logDebug("查询发言时间不存在", userId, groupId);
|
||||
return resolve("insert");
|
||||
}
|
||||
|
||||
logDebug("查询发言时间存在", userId, groupId);
|
||||
resolve("update");
|
||||
}
|
||||
);
|
||||
});
|
||||
}
|
||||
async createGroupInfoTimeTableIfNotExist(groupId: number) {
|
||||
const createTableSQL = (groupId: number) =>
|
||||
`CREATE TABLE IF NOT EXISTS "${groupId}" (
|
||||
user_id INTEGER,
|
||||
last_sent_time INTEGER,
|
||||
join_time INTEGER,
|
||||
PRIMARY KEY (user_id)
|
||||
);`;
|
||||
|
||||
if (this.groupIds.includes(groupId)) {
|
||||
return;
|
||||
}
|
||||
return new Promise((resolve, reject) => {
|
||||
const sql = createTableSQL(groupId);
|
||||
this.db!.all(sql, (err) => {
|
||||
if (err) {
|
||||
reject(err);
|
||||
return;
|
||||
}
|
||||
this.groupIds.push(groupId);
|
||||
resolve(true);
|
||||
});
|
||||
});
|
||||
}
|
||||
protected createTable() {
|
||||
// 消息记录
|
||||
const createTableSQL = `
|
||||
CREATE TABLE IF NOT EXISTS msgs (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
shortId INTEGER NOT NULL UNIQUE,
|
||||
longId TEXT NOT NULL UNIQUE,
|
||||
seq INTEGER NOT NULL,
|
||||
peerUid TEXT NOT NULL,
|
||||
chatType INTEGER NOT NULL
|
||||
)`;
|
||||
this.db!.run(createTableSQL, function (err) {
|
||||
if (err) {
|
||||
logError('Could not create table msgs', err.stack);
|
||||
}
|
||||
});
|
||||
|
||||
// 文件缓存
|
||||
const createFileTableSQL = `
|
||||
CREATE TABLE IF NOT EXISTS files (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
name TEXT NOT NULL,
|
||||
path TEXT NOT NULL,
|
||||
url TEXT,
|
||||
size INTEGER NOT NULL,
|
||||
uuid TEXT,
|
||||
elementType INTEGER,
|
||||
element TEXT NOT NULL,
|
||||
elementId TEXT NOT NULL,
|
||||
msgId TEXT NOT NULL
|
||||
)`;
|
||||
this.db!.run(createFileTableSQL, function (err) {
|
||||
if (err) {
|
||||
logError('Could not create table files', err);
|
||||
}
|
||||
});
|
||||
|
||||
// 接收到的临时会话消息uid
|
||||
const createTempUinTableSQL = `
|
||||
CREATE TABLE IF NOT EXISTS temp_uins (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
uid TEXT,
|
||||
uin TEXT
|
||||
)`;
|
||||
this.db!.run(createTempUinTableSQL, function (err) {
|
||||
if (err) {
|
||||
logError('Could not create table temp_uins', err);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private async getCurrentMaxShortId() {
|
||||
return new Promise<number>((resolve, reject) => {
|
||||
this.db!.get('SELECT MAX(shortId) as maxId FROM msgs', (err, row: { maxId: number }) => {
|
||||
if (err) {
|
||||
logDebug('Could not get max short id, Use default -2147483640', err);
|
||||
return resolve(-2147483640);
|
||||
}
|
||||
logDebug('数据库中消息最大短id', row?.maxId);
|
||||
resolve(row?.maxId ?? -2147483640);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
private async getMsg(query: string, params: any[]) {
|
||||
const stmt = this.db!.prepare(query);
|
||||
return new Promise<RawMessage | null>((resolve, reject) => {
|
||||
stmt.get(...params, (err: any, row: DBMsg) => {
|
||||
// log("getMsg", row, err);
|
||||
if (err) {
|
||||
logError('Could not get msg', err, query, params);
|
||||
return resolve(null);
|
||||
}
|
||||
if (!row) {
|
||||
// logDebug('不存在数据库中的消息,不进行处理', query, params);
|
||||
resolve(null);
|
||||
return;
|
||||
}
|
||||
const msgId = row.longId;
|
||||
NTQQMsgApi.getMsgsByMsgId({ peerUid: row.peerUid, chatType: row.chatType }, [msgId]).then(res => {
|
||||
const msg = res.msgList[0];
|
||||
if (!msg) {
|
||||
resolve(null);
|
||||
return;
|
||||
}
|
||||
msg.id = row.shortId;
|
||||
resolve(msg);
|
||||
}).catch(e => {
|
||||
resolve(null);
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
async getMsgByShortId(shortId: number): Promise<RawMessage | null> {
|
||||
if (this.msgCache.has(shortId)) {
|
||||
return this.msgCache.get(shortId)!;
|
||||
}
|
||||
const getStmt = 'SELECT * FROM msgs WHERE shortId = ?';
|
||||
return this.getMsg(getStmt, [shortId]);
|
||||
}
|
||||
|
||||
async getMsgByLongId(longId: string): Promise<RawMessage | null> {
|
||||
if (this.msgCache.has(longId)) {
|
||||
return this.msgCache.get(longId)!;
|
||||
}
|
||||
return this.getMsg('SELECT * FROM msgs WHERE longId = ?', [longId]);
|
||||
}
|
||||
|
||||
async getMsgBySeq(peerUid: string, seq: string): Promise<RawMessage | null> {
|
||||
const stmt = 'SELECT * FROM msgs WHERE peerUid = ? AND seq = ?';
|
||||
return this.getMsg(stmt, [peerUid, seq]);
|
||||
}
|
||||
|
||||
async addMsg(msg: RawMessage, update = true): Promise<number> {
|
||||
const existMsg = await this.getMsgByLongId(msg.msgId);
|
||||
if (existMsg) {
|
||||
// logDebug('消息已存在,更新数据库', msg.msgId);
|
||||
if (update) this.updateMsg(msg).then();
|
||||
return existMsg.id!;
|
||||
}
|
||||
const stmt = this.db!.prepare('INSERT INTO msgs (shortId, longId, seq, peerUid, chatType) VALUES (?, ?, ?, ?, ?)');
|
||||
// const runAsync = promisify(stmt.run.bind(stmt));
|
||||
const shortId = ++this.globalMsgShortId;
|
||||
msg.id = shortId;
|
||||
//logDebug(`记录消息到数据库, 消息长id: ${msg.msgId}, 短id: ${msg.id}`);
|
||||
this.msgCache.set(shortId, msg);
|
||||
this.msgCache.set(msg.msgId, msg);
|
||||
stmt.run(this.globalMsgShortId, msg.msgId, msg.msgSeq.toString(), msg.peerUid, msg.chatType, (err: any) => {
|
||||
if (err) {
|
||||
if (err.errno === 19) {
|
||||
this.getMsgByLongId(msg.msgId).then((msg: RawMessage | null) => {
|
||||
if (msg) {
|
||||
this.msgCache.set(shortId, msg);
|
||||
this.msgCache.set(msg.msgId, msg);
|
||||
// logDebug('获取消息短id成功', msg.id);
|
||||
} else {
|
||||
logError('db could not get msg by long id', err);
|
||||
}
|
||||
}).catch(e => logError('db getMsgByLongId error', e));
|
||||
} else {
|
||||
logError('db could not add msg', err);
|
||||
}
|
||||
}
|
||||
});
|
||||
return shortId;
|
||||
}
|
||||
|
||||
async updateMsg(msg: RawMessage) {
|
||||
const existMsg = this.msgCache.get(msg.msgId);
|
||||
if (existMsg) {
|
||||
Object.assign(existMsg, msg);
|
||||
}
|
||||
//logDebug(`更新消息, shortId:${msg.id}, seq: ${msg.msgSeq}, msgId: ${msg.msgId}`);
|
||||
const stmt = this.db!.prepare('UPDATE msgs SET seq=? WHERE longId=?');
|
||||
stmt.run(msg.msgSeq, msg.msgId, (err: any) => {
|
||||
if (err) {
|
||||
logError('updateMsg db error', err);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
async addFileCache(file: DBFile) {
|
||||
const stmt = this.db!.prepare('INSERT INTO files (name, path, url, size, uuid, elementType ,element, elementId, msgId) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)');
|
||||
return new Promise((resolve, reject) => {
|
||||
stmt.run(file.name, file.path, file.url, file.size, file.uuid,
|
||||
file.elementType,
|
||||
JSON.stringify(file.element),
|
||||
file.elementId,
|
||||
file.msgId,
|
||||
function (err: any) {
|
||||
if (err) {
|
||||
logError('db could not add file', err);
|
||||
reject(err);
|
||||
}
|
||||
resolve(null);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
private async getFileCache(query: string, params: any[]) {
|
||||
const stmt = this.db!.prepare(query);
|
||||
return new Promise<DBFile | null>((resolve, reject) => {
|
||||
stmt.get(...params, (err: any, row: DBFile & { element: string }) => {
|
||||
if (err) {
|
||||
logError('db could not get file cache', err);
|
||||
reject(err);
|
||||
}
|
||||
if (row) {
|
||||
row.element = JSON.parse(row.element);
|
||||
}
|
||||
resolve(row);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
async getFileCacheByName(name: string): Promise<DBFile | null> {
|
||||
return this.getFileCache('SELECT * FROM files WHERE name = ?', [name]);
|
||||
}
|
||||
|
||||
async getFileCacheByUuid(uuid: string): Promise<DBFile | null> {
|
||||
return this.getFileCache('SELECT * FROM files WHERE uuid = ?', [uuid]);
|
||||
}
|
||||
|
||||
// todo: 是否所有的文件都有uuid?语音消息有没有uuid?
|
||||
async updateFileCache(file: DBFile) {
|
||||
const stmt = this.db!.prepare('UPDATE files SET path = ?, url = ? WHERE uuid = ?');
|
||||
return new Promise((resolve, reject) => {
|
||||
stmt.run(file.path, file.url, file.uuid, function (err: any) {
|
||||
if (err) {
|
||||
logError('db could not update file cache', err);
|
||||
reject(err);
|
||||
}
|
||||
resolve(null);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// 被动收到的临时会话消息uin->uid
|
||||
async getReceivedTempUinMap() {
|
||||
const stmt = 'SELECT * FROM temp_uins';
|
||||
return new Promise<Record<string, string>>((resolve, reject) => {
|
||||
this.db!.all(stmt, (err, rows: { uin: string, uid: string }[]) => {
|
||||
if (err) {
|
||||
logError('db could not get temp uin map', err);
|
||||
reject(err);
|
||||
}
|
||||
const map: Record<string, string> = {};
|
||||
rows.forEach(row => {
|
||||
map[row.uin] = row.uid;
|
||||
});
|
||||
resolve(map);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// 通过uin获取临时会话消息uid
|
||||
async getUidByTempUin(uid: string) {
|
||||
const stmt = 'SELECT * FROM temp_uins WHERE uin = ?';
|
||||
return new Promise<string>((resolve, reject) => {
|
||||
this.db!.get(stmt, [uid], (err, row: { uin: string, uid: string }) => {
|
||||
if (err) {
|
||||
logError('db could not get temp uin map', err);
|
||||
reject(err);
|
||||
}
|
||||
resolve(row?.uid);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
async addTempUin(uin: string, uid: string) {
|
||||
const existUid = await this.getUidByTempUin(uin);
|
||||
if (!existUid) {
|
||||
const stmt = this.db!.prepare('INSERT INTO temp_uins (uin, uid) VALUES (?, ?)');
|
||||
return new Promise((resolve, reject) => {
|
||||
stmt.run(uin, uid, function (err: any) {
|
||||
if (err) {
|
||||
logError('db could not add temp uin', err);
|
||||
reject(err);
|
||||
}
|
||||
resolve(null);
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
async getLastSentTimeAndJoinTime(
|
||||
groupId: number
|
||||
): Promise<IRember[]> {
|
||||
logDebug("读取发言时间", groupId);
|
||||
return new Promise<IRember[]>((resolve, reject) => {
|
||||
this.db!.all(`SELECT * FROM "${groupId}" `, (err, rows: IRember[]) => {
|
||||
if (err) {
|
||||
logError("查询发言时间失败", groupId);
|
||||
return resolve([]);
|
||||
}
|
||||
logDebug("查询发言时间成功", groupId, rows);
|
||||
resolve(rows);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
insertLastSentTime(
|
||||
groupId: number,
|
||||
userId: number,
|
||||
time: number
|
||||
) {
|
||||
this.LURCache.set(groupId, userId, time)
|
||||
}
|
||||
async insertJoinTime(
|
||||
groupId: number,
|
||||
userId: number,
|
||||
time: number
|
||||
) {
|
||||
await this.createGroupInfoTimeTableIfNotExist(groupId);
|
||||
this.db!.all(
|
||||
`INSERT OR REPLACE INTO "${groupId}" (user_id, last_sent_time, join_time) VALUES (?,?,?)`,
|
||||
[userId, time, time],
|
||||
(err) => {
|
||||
if (err)
|
||||
logError(err),
|
||||
Promise.reject(),
|
||||
console.log("插入入群时间失败", userId, groupId);
|
||||
}
|
||||
);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export const dbUtil = new DBUtil();
|
||||
import { ElementType, FileElement, PicElement, PttElement, RawMessage, VideoElement } from '../../core/src/entities';
|
||||
|
||||
import sqlite3 from 'sqlite3';
|
||||
import { log, logDebug, logError } from '@/common/utils/log';
|
||||
import { NTQQMsgApi } from '@/core';
|
||||
import LRU from '@/common/utils/LRUCache';
|
||||
|
||||
export interface IRember {
|
||||
last_sent_time: number;
|
||||
join_time: number;
|
||||
user_id: number;
|
||||
}
|
||||
|
||||
|
||||
type DBMsg = {
|
||||
id: number,
|
||||
shortId: number,
|
||||
longId: string,
|
||||
seq: number,
|
||||
peerUid: string,
|
||||
chatType: number,
|
||||
}
|
||||
|
||||
type DBFile = {
|
||||
name: string; // 文件名
|
||||
path: string;
|
||||
url: string;
|
||||
size: number;
|
||||
uuid: string;
|
||||
msgId: string;
|
||||
elementId: string;
|
||||
element: PicElement | VideoElement | FileElement | PttElement;
|
||||
elementType: ElementType.PIC | ElementType.VIDEO | ElementType.FILE | ElementType.PTT;
|
||||
}
|
||||
|
||||
|
||||
class DBUtilBase {
|
||||
protected db: sqlite3.Database | undefined;
|
||||
|
||||
async init(dbPath: string) {
|
||||
if (this.db) {
|
||||
return;
|
||||
}
|
||||
return new Promise<void>((resolve, reject) => {
|
||||
this.db = new sqlite3.Database(dbPath, sqlite3.OPEN_READWRITE | sqlite3.OPEN_CREATE, (err) => {
|
||||
if (err) {
|
||||
logError('Could not connect to database', err);
|
||||
reject(err);
|
||||
return;
|
||||
}
|
||||
this.createTable();
|
||||
resolve();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
protected createTable() {
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
|
||||
close() {
|
||||
this.db?.close();
|
||||
}
|
||||
}
|
||||
|
||||
class DBUtil extends DBUtilBase {
|
||||
private msgCache: Map<string | number, RawMessage> = new Map<string | number, RawMessage>();
|
||||
private globalMsgShortId = -2147483640;
|
||||
private groupIds: number[] = [];
|
||||
private LURCache = new LRU<number>();
|
||||
private LastSentCache = new (class {
|
||||
private cache: { gid: number; uid: number }[] = [];
|
||||
private maxSize: number;
|
||||
|
||||
constructor(maxSize: number = 5000) {
|
||||
this.maxSize = maxSize;
|
||||
}
|
||||
|
||||
get(gid: number, uid: number): boolean {
|
||||
const exists = this.cache.some(
|
||||
(entry) => entry.gid === gid && entry.uid === uid
|
||||
);
|
||||
if (!exists) {
|
||||
this.cache.push({ gid, uid });
|
||||
if (this.cache.length > this.maxSize) {
|
||||
this.cache.shift();
|
||||
}
|
||||
}
|
||||
|
||||
return exists;
|
||||
}
|
||||
})();
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
const interval = 1000 * 60 * 10; // 10分钟清理一次缓存
|
||||
setInterval(() => {
|
||||
logDebug('清理消息缓存');
|
||||
this.msgCache.forEach((msg, key) => {
|
||||
if ((Date.now() - parseInt(msg.msgTime) * 1000) > interval) {
|
||||
this.msgCache.delete(key);
|
||||
}
|
||||
});
|
||||
}, interval);
|
||||
}
|
||||
|
||||
async init(dbPath: string) {
|
||||
await super.init(dbPath);
|
||||
this.globalMsgShortId = await this.getCurrentMaxShortId();
|
||||
|
||||
|
||||
// 初始化群缓存列表
|
||||
this.db!.serialize(() => {
|
||||
const sql = 'SELECT * FROM sqlite_master WHERE type=\'table\'';
|
||||
this.db!.all(sql, [], (err, rows: { name: string }[]) => {
|
||||
if (err) return logError(err);
|
||||
rows.forEach((row) => this.groupIds.push(parseInt(row.name)));
|
||||
//logDebug(`已加载 ${groupIds.length} 个群`);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
this.LURCache.on(async (node) => {
|
||||
const { value: time, groupId, userId } = node;
|
||||
|
||||
logDebug('插入发言时间', userId, groupId);
|
||||
await this.createGroupInfoTimeTableIfNotExist(groupId);
|
||||
|
||||
const method = await this.getDataSetMethod(groupId, userId);
|
||||
logDebug('插入发言时间方法判断', userId, groupId, method);
|
||||
|
||||
const sql =
|
||||
method == 'update'
|
||||
? `UPDATE "${groupId}" SET last_sent_time = ? WHERE user_id = ?`
|
||||
: `INSERT INTO "${groupId}" (last_sent_time, user_id) VALUES (?, ?)`;
|
||||
|
||||
this.db!.all(sql, [time, userId], (err) => {
|
||||
if (err) {
|
||||
return logError('插入/更新发言时间失败', userId, groupId);
|
||||
}
|
||||
logDebug('插入/更新发言时间成功', userId, groupId);
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
async getDataSetMethod(groupId: number, userId: number) {
|
||||
// 缓存记录
|
||||
if (this.LastSentCache.get(groupId, userId)) {
|
||||
logDebug('缓存命中', userId, groupId);
|
||||
return 'update';
|
||||
}
|
||||
|
||||
// 数据库判断
|
||||
return new Promise<'insert' | 'update'>((resolve, reject) => {
|
||||
this.db!.all(
|
||||
`SELECT * FROM "${groupId}" WHERE user_id = ?`,
|
||||
[userId],
|
||||
(err, rows) => {
|
||||
if (err) {
|
||||
logError('查询发言时间存在失败', userId, groupId, err);
|
||||
return logError('插入发言时间失败', userId, groupId, err);
|
||||
}
|
||||
|
||||
if (rows.length === 0) {
|
||||
logDebug('查询发言时间不存在', userId, groupId);
|
||||
return resolve('insert');
|
||||
}
|
||||
|
||||
logDebug('查询发言时间存在', userId, groupId);
|
||||
resolve('update');
|
||||
}
|
||||
);
|
||||
});
|
||||
}
|
||||
async createGroupInfoTimeTableIfNotExist(groupId: number) {
|
||||
const createTableSQL = (groupId: number) =>
|
||||
`CREATE TABLE IF NOT EXISTS "${groupId}" (
|
||||
user_id INTEGER,
|
||||
last_sent_time INTEGER,
|
||||
join_time INTEGER,
|
||||
PRIMARY KEY (user_id)
|
||||
);`;
|
||||
|
||||
if (this.groupIds.includes(groupId)) {
|
||||
return;
|
||||
}
|
||||
return new Promise((resolve, reject) => {
|
||||
const sql = createTableSQL(groupId);
|
||||
this.db!.all(sql, (err) => {
|
||||
if (err) {
|
||||
reject(err);
|
||||
return;
|
||||
}
|
||||
this.groupIds.push(groupId);
|
||||
resolve(true);
|
||||
});
|
||||
});
|
||||
}
|
||||
protected createTable() {
|
||||
// 消息记录
|
||||
const createTableSQL = `
|
||||
CREATE TABLE IF NOT EXISTS msgs (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
shortId INTEGER NOT NULL UNIQUE,
|
||||
longId TEXT NOT NULL UNIQUE,
|
||||
seq INTEGER NOT NULL,
|
||||
peerUid TEXT NOT NULL,
|
||||
chatType INTEGER NOT NULL
|
||||
)`;
|
||||
this.db!.run(createTableSQL, function (err) {
|
||||
if (err) {
|
||||
logError('Could not create table msgs', err.stack);
|
||||
}
|
||||
});
|
||||
|
||||
// 文件缓存
|
||||
const createFileTableSQL = `
|
||||
CREATE TABLE IF NOT EXISTS files (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
name TEXT NOT NULL,
|
||||
path TEXT NOT NULL,
|
||||
url TEXT,
|
||||
size INTEGER NOT NULL,
|
||||
uuid TEXT,
|
||||
elementType INTEGER,
|
||||
element TEXT NOT NULL,
|
||||
elementId TEXT NOT NULL,
|
||||
msgId TEXT NOT NULL
|
||||
)`;
|
||||
this.db!.run(createFileTableSQL, function (err) {
|
||||
if (err) {
|
||||
logError('Could not create table files', err);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private async getCurrentMaxShortId() {
|
||||
return new Promise<number>((resolve, reject) => {
|
||||
this.db!.get('SELECT MAX(shortId) as maxId FROM msgs', (err, row: { maxId: number }) => {
|
||||
if (err) {
|
||||
logDebug('Could not get max short id, Use default -2147483640', err);
|
||||
return resolve(-2147483640);
|
||||
}
|
||||
logDebug('数据库中消息最大短id', row?.maxId);
|
||||
resolve(row?.maxId ?? -2147483640);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
private async getMsg(query: string, params: any[]) {
|
||||
const stmt = this.db!.prepare(query);
|
||||
return new Promise<RawMessage | null>((resolve, reject) => {
|
||||
stmt.get(...params, (err: any, row: DBMsg) => {
|
||||
// log("getMsg", row, err);
|
||||
if (err) {
|
||||
logError('Could not get msg', err, query, params);
|
||||
return resolve(null);
|
||||
}
|
||||
if (!row) {
|
||||
// logDebug('不存在数据库中的消息,不进行处理', query, params);
|
||||
resolve(null);
|
||||
return;
|
||||
}
|
||||
const msgId = row.longId;
|
||||
NTQQMsgApi.getMsgsByMsgId({ peerUid: row.peerUid, chatType: row.chatType }, [msgId]).then(res => {
|
||||
const msg = res.msgList[0];
|
||||
if (!msg) {
|
||||
resolve(null);
|
||||
return;
|
||||
}
|
||||
msg.id = row.shortId;
|
||||
resolve(msg);
|
||||
}).catch(e => {
|
||||
resolve(null);
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
async getMsgByShortId(shortId: number): Promise<RawMessage | null> {
|
||||
if (this.msgCache.has(shortId)) {
|
||||
return this.msgCache.get(shortId)!;
|
||||
}
|
||||
const getStmt = 'SELECT * FROM msgs WHERE shortId = ?';
|
||||
return this.getMsg(getStmt, [shortId]);
|
||||
}
|
||||
|
||||
async getMsgByLongId(longId: string): Promise<RawMessage | null> {
|
||||
if (this.msgCache.has(longId)) {
|
||||
return this.msgCache.get(longId)!;
|
||||
}
|
||||
return this.getMsg('SELECT * FROM msgs WHERE longId = ?', [longId]);
|
||||
}
|
||||
|
||||
async getMsgBySeq(peerUid: string, seq: string): Promise<RawMessage | null> {
|
||||
const stmt = 'SELECT * FROM msgs WHERE peerUid = ? AND seq = ?';
|
||||
return this.getMsg(stmt, [peerUid, seq]);
|
||||
}
|
||||
|
||||
async addMsg(msg: RawMessage, update = true): Promise<number> {
|
||||
const existMsg = await this.getMsgByLongId(msg.msgId);
|
||||
if (existMsg) {
|
||||
// logDebug('消息已存在,更新数据库', msg.msgId);
|
||||
if (update) this.updateMsg(msg).then();
|
||||
return existMsg.id!;
|
||||
}
|
||||
const stmt = this.db!.prepare('INSERT INTO msgs (shortId, longId, seq, peerUid, chatType) VALUES (?, ?, ?, ?, ?)');
|
||||
// const runAsync = promisify(stmt.run.bind(stmt));
|
||||
const shortId = ++this.globalMsgShortId;
|
||||
msg.id = shortId;
|
||||
//logDebug(`记录消息到数据库, 消息长id: ${msg.msgId}, 短id: ${msg.id}`);
|
||||
this.msgCache.set(shortId, msg);
|
||||
this.msgCache.set(msg.msgId, msg);
|
||||
stmt.run(this.globalMsgShortId, msg.msgId, msg.msgSeq.toString(), msg.peerUid, msg.chatType, (err: any) => {
|
||||
if (err) {
|
||||
if (err.errno === 19) {
|
||||
this.getMsgByLongId(msg.msgId).then((msg: RawMessage | null) => {
|
||||
if (msg) {
|
||||
this.msgCache.set(shortId, msg);
|
||||
this.msgCache.set(msg.msgId, msg);
|
||||
// logDebug('获取消息短id成功', msg.id);
|
||||
} else {
|
||||
logError('db could not get msg by long id', err);
|
||||
}
|
||||
}).catch(e => logError('db getMsgByLongId error', e));
|
||||
} else {
|
||||
logError('db could not add msg', err);
|
||||
}
|
||||
}
|
||||
});
|
||||
return shortId;
|
||||
}
|
||||
|
||||
async updateMsg(msg: RawMessage) {
|
||||
const existMsg = this.msgCache.get(msg.msgId);
|
||||
if (existMsg) {
|
||||
Object.assign(existMsg, msg);
|
||||
}
|
||||
//logDebug(`更新消息, shortId:${msg.id}, seq: ${msg.msgSeq}, msgId: ${msg.msgId}`);
|
||||
const stmt = this.db!.prepare('UPDATE msgs SET seq=? WHERE longId=?');
|
||||
stmt.run(msg.msgSeq, msg.msgId, (err: any) => {
|
||||
if (err) {
|
||||
logError('updateMsg db error', err);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
async addFileCache(file: DBFile) {
|
||||
const stmt = this.db!.prepare('INSERT INTO files (name, path, url, size, uuid, elementType ,element, elementId, msgId) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)');
|
||||
return new Promise((resolve, reject) => {
|
||||
stmt.run(file.name, file.path, file.url, file.size, file.uuid,
|
||||
file.elementType,
|
||||
JSON.stringify(file.element),
|
||||
file.elementId,
|
||||
file.msgId,
|
||||
function (err: any) {
|
||||
if (err) {
|
||||
logError('db could not add file', err);
|
||||
reject(err);
|
||||
}
|
||||
resolve(null);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
private async getFileCache(query: string, params: any[]) {
|
||||
const stmt = this.db!.prepare(query);
|
||||
return new Promise<DBFile | null>((resolve, reject) => {
|
||||
stmt.get(...params, (err: any, row: DBFile & { element: string }) => {
|
||||
if (err) {
|
||||
logError('db could not get file cache', err);
|
||||
reject(err);
|
||||
}
|
||||
if (row) {
|
||||
row.element = JSON.parse(row.element);
|
||||
}
|
||||
resolve(row);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
async getFileCacheByName(name: string): Promise<DBFile | null> {
|
||||
return this.getFileCache('SELECT * FROM files WHERE name = ?', [name]);
|
||||
}
|
||||
|
||||
async getFileCacheByUuid(uuid: string): Promise<DBFile | null> {
|
||||
return this.getFileCache('SELECT * FROM files WHERE uuid = ?', [uuid]);
|
||||
}
|
||||
|
||||
// todo: 是否所有的文件都有uuid?语音消息有没有uuid?
|
||||
async updateFileCache(file: DBFile) {
|
||||
const stmt = this.db!.prepare('UPDATE files SET path = ?, url = ? WHERE uuid = ?');
|
||||
return new Promise((resolve, reject) => {
|
||||
stmt.run(file.path, file.url, file.uuid, function (err: any) {
|
||||
if (err) {
|
||||
logError('db could not update file cache', err);
|
||||
reject(err);
|
||||
}
|
||||
resolve(null);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
async getLastSentTimeAndJoinTime(
|
||||
groupId: number
|
||||
): Promise<IRember[]> {
|
||||
logDebug('读取发言时间', groupId);
|
||||
return new Promise<IRember[]>((resolve, reject) => {
|
||||
this.db!.all(`SELECT * FROM "${groupId}" `, (err, rows: IRember[]) => {
|
||||
if (err) {
|
||||
logError('查询发言时间失败', groupId);
|
||||
return resolve([]);
|
||||
}
|
||||
logDebug('查询发言时间成功', groupId, rows);
|
||||
resolve(rows);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
insertLastSentTime(
|
||||
groupId: number,
|
||||
userId: number,
|
||||
time: number
|
||||
) {
|
||||
this.LURCache.set(groupId, userId, time);
|
||||
}
|
||||
async insertJoinTime(
|
||||
groupId: number,
|
||||
userId: number,
|
||||
time: number
|
||||
) {
|
||||
await this.createGroupInfoTimeTableIfNotExist(groupId);
|
||||
this.db!.all(
|
||||
`INSERT OR REPLACE INTO "${groupId}" (user_id, last_sent_time, join_time) VALUES (?,?,?)`,
|
||||
[userId, time, time],
|
||||
(err) => {
|
||||
if (err)
|
||||
logError(err),
|
||||
Promise.reject(),
|
||||
logError('插入入群时间失败', userId, groupId);
|
||||
}
|
||||
);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export const dbUtil = new DBUtil();
|
||||
|
@@ -1,9 +1,9 @@
|
||||
import fs from 'fs';
|
||||
import fsPromise from 'fs/promises';
|
||||
import fsPromise, { stat } from 'fs/promises';
|
||||
import crypto from 'crypto';
|
||||
import util from 'util';
|
||||
import path from 'node:path';
|
||||
import { log } from './log';
|
||||
import { log, logError } from './log';
|
||||
import { dbUtil } from '@/common/utils/db';
|
||||
import * as fileType from 'file-type';
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
@@ -50,7 +50,40 @@ export function checkFileReceived(path: string, timeout: number = 3000): Promise
|
||||
check();
|
||||
});
|
||||
}
|
||||
// 定义一个异步函数来检查文件是否存在
|
||||
export async function checkFileReceived2(path: string, timeout: number = 3000): Promise<void> {
|
||||
// 使用 Promise.race 来同时进行文件状态检查和超时计时
|
||||
// Promise.race 会返回第一个解决(resolve)或拒绝(reject)的 Promise
|
||||
await Promise.race([
|
||||
checkFile(path),
|
||||
timeoutPromise(timeout, `文件不存在: ${path}`),
|
||||
]);
|
||||
}
|
||||
|
||||
// 转换超时时间至 Promise
|
||||
function timeoutPromise(timeout: number, errorMsg: string): Promise<void> {
|
||||
return new Promise((_, reject) => {
|
||||
setTimeout(() => {
|
||||
reject(new Error(errorMsg));
|
||||
}, timeout);
|
||||
});
|
||||
}
|
||||
|
||||
// 异步检查文件是否存在
|
||||
async function checkFile(path: string): Promise<void> {
|
||||
try {
|
||||
await stat(path);
|
||||
} catch (error: any) {
|
||||
if (error.code === 'ENOENT') {
|
||||
// 如果文件不存在,则抛出一个错误
|
||||
throw new Error(`文件不存在: ${path}`);
|
||||
} else {
|
||||
// 对于 stat 调用的其他错误,重新抛出
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
// 如果文件存在,则无需做任何事情,Promise 解决(resolve)自身
|
||||
}
|
||||
export async function file2base64(path: string) {
|
||||
const readFile = util.promisify(fs.readFile);
|
||||
const result = {
|
||||
@@ -262,12 +295,12 @@ export async function copyFolder(sourcePath: string, destPath: string) {
|
||||
try {
|
||||
await fsPromise.copyFile(srcPath, dstPath);
|
||||
} catch (error) {
|
||||
console.error(`无法复制文件 '${srcPath}' 到 '${dstPath}': ${error}`);
|
||||
logError(`无法复制文件 '${srcPath}' 到 '${dstPath}': ${error}`);
|
||||
// 这里可以决定是否要继续复制其他文件
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('复制文件夹时出错:', error);
|
||||
logError('复制文件夹时出错:', error);
|
||||
}
|
||||
}
|
||||
|
@@ -4,7 +4,7 @@ import fs from 'fs/promises';
|
||||
import { log, logDebug } from './log';
|
||||
import { dirname } from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
|
||||
import * as fsPromise from 'node:fs/promises';
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = dirname(__filename);
|
||||
@@ -43,8 +43,88 @@ export function truncateString(obj: any, maxLength = 500) {
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
export function simpleDecorator(target: any, context: any) {
|
||||
}
|
||||
|
||||
// export function CacheClassFunc(ttl: number = 3600 * 1000, customKey: string = '') {
|
||||
// const cache = new Map<string, { expiry: number; value: any }>();
|
||||
// return function CacheClassFuncDecorator(originalMethod: Function, context: ClassMethodDecoratorContext) {
|
||||
// async function CacheClassFuncDecoratorInternal(this: any, ...args: any[]) {
|
||||
// const key = `${customKey}${String(context.name)}.(${args.map(arg => JSON.stringify(arg)).join(', ')})`;
|
||||
// const cachedValue = cache.get(key);
|
||||
// if (cachedValue && cachedValue.expiry > Date.now()) {
|
||||
// return cachedValue.value;
|
||||
// }
|
||||
// const result = originalMethod.call(this, ...args);
|
||||
// cache.set(key, { expiry: Date.now() + ttl, value: result });
|
||||
// return result;
|
||||
// }
|
||||
// return CacheClassFuncDecoratorInternal;
|
||||
// }
|
||||
// }
|
||||
export function CacheClassFuncAsync(ttl: number = 3600 * 1000, customKey: string = '') {
|
||||
//console.log('CacheClassFuncAsync', ttl, customKey);
|
||||
function logExecutionTime(target: any, methodName: string, descriptor: PropertyDescriptor) {
|
||||
//console.log('logExecutionTime', target, methodName, descriptor);
|
||||
const cache = new Map<string, { expiry: number; value: any }>();
|
||||
const originalMethod = descriptor.value;
|
||||
descriptor.value = async function (...args: any[]) {
|
||||
const key = `${customKey}${String(methodName)}.(${args.map(arg => JSON.stringify(arg)).join(', ')})`;
|
||||
cache.forEach((value, key) => {
|
||||
if (value.expiry < Date.now()) {
|
||||
cache.delete(key);
|
||||
}
|
||||
});
|
||||
const cachedValue = cache.get(key);
|
||||
if (cachedValue && cachedValue.expiry > Date.now()) {
|
||||
return cachedValue.value;
|
||||
}
|
||||
// const start = Date.now();
|
||||
const result = await originalMethod.apply(this, args);
|
||||
// const end = Date.now();
|
||||
// console.log(`Method ${methodName} executed in ${end - start} ms.`);
|
||||
cache.set(key, { expiry: Date.now() + ttl, value: result });
|
||||
return result;
|
||||
};
|
||||
}
|
||||
return logExecutionTime;
|
||||
}
|
||||
|
||||
// export function CacheClassFuncAsync(ttl: number = 3600 * 1000, customKey: string = ''): any {
|
||||
// const cache = new Map<string, { expiry: number; value: any }>();
|
||||
|
||||
// // 注意:在JavaScript装饰器中,我们通常不直接处理ClassMethodDecoratorContext这样的类型,
|
||||
// // 因为装饰器的参数通常是目标类(对于类装饰器)、属性名(对于属性装饰器)等。
|
||||
// // 对于方法装饰器,我们关注的是方法本身及其描述符。
|
||||
// // 但这里我们维持原逻辑,假设有一个自定义的处理上下文的方式。
|
||||
|
||||
// return function (originalMethod: Function): any {
|
||||
// console.log(originalMethod);
|
||||
// // 由于JavaScript装饰器原生不支持异步直接定义,我们保持async定义以便处理异步方法。
|
||||
// async function decoratorWrapper(this: any, ...args: any[]): Promise<any> {
|
||||
// console.log(...args);
|
||||
// const key = `${customKey}${originalMethod.name}.(${args.map(arg => JSON.stringify(arg)).join(', ')})`;
|
||||
// const cachedValue = cache.get(key);
|
||||
// // 遍历cache 清除expiry内容
|
||||
// cache.forEach((value, key) => {
|
||||
// if (value.expiry < Date.now()) {
|
||||
// cache.delete(key);
|
||||
// }
|
||||
// });
|
||||
// if (cachedValue && cachedValue.expiry > Date.now()) {
|
||||
// return cachedValue.value;
|
||||
// }
|
||||
|
||||
// // 直接await异步方法的结果
|
||||
// const result = await originalMethod.apply(this, args);
|
||||
// cache.set(key, { expiry: Date.now() + ttl, value: result });
|
||||
// return result;
|
||||
// }
|
||||
|
||||
// // 返回装饰后的方法,保持与原方法相同的名称和描述符(如果需要更精细的控制,可以考虑使用Object.getOwnPropertyDescriptor等)
|
||||
// return decoratorWrapper;
|
||||
// };
|
||||
// }
|
||||
|
||||
/**
|
||||
* 函数缓存装饰器,根据方法名、参数、自定义key生成缓存键,在一定时间内返回缓存结果
|
||||
@@ -181,4 +261,26 @@ export function isEqual(obj1: any, obj2: any) {
|
||||
if (!isEqual(obj1[key], obj2[key])) return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
export async function deleteOldFiles(directoryPath: string, daysThreshold: number) {
|
||||
try {
|
||||
const files = await fsPromise.readdir(directoryPath);
|
||||
|
||||
for (const file of files) {
|
||||
const filePath = path.join(directoryPath, file);
|
||||
const stats = await fsPromise.stat(filePath);
|
||||
const lastModifiedTime = stats.mtimeMs;
|
||||
const currentTime = Date.now();
|
||||
const timeDifference = currentTime - lastModifiedTime;
|
||||
const daysDifference = timeDifference / (1000 * 60 * 60 * 24);
|
||||
|
||||
if (daysDifference > daysThreshold) {
|
||||
await fsPromise.unlink(filePath); // Delete the file
|
||||
//console.log(`Deleted: ${filePath}`);
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
//console.error('Error deleting files:', error);
|
||||
}
|
||||
}
|
||||
|
@@ -4,7 +4,7 @@ import path from 'node:path';
|
||||
import { SelfInfo } from '@/core';
|
||||
import { dirname } from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
|
||||
import chalk from 'chalk';
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = dirname(__filename);
|
||||
@@ -39,17 +39,17 @@ const logConfig: Configuration = {
|
||||
FileAppender: { // 输出到文件的appender
|
||||
type: 'file',
|
||||
filename: logPath, // 指定日志文件的位置和文件名
|
||||
maxLoogSize: 10485760, // 日志文件的最大大小(单位:字节),这里设置为10MB
|
||||
maxLogSize: 10485760, // 日志文件的最大大小(单位:字节),这里设置为10MB
|
||||
layout: {
|
||||
type: 'pattern',
|
||||
pattern: '%d{yyyy-MM-dd hh:mm:ss} [%p] - %m'
|
||||
pattern: '%d{yyyy-MM-dd hh:mm:ss} [%p] %X{userInfo} | %m'
|
||||
}
|
||||
},
|
||||
ConsoleAppender: { // 输出到控制台的appender
|
||||
type: 'console',
|
||||
layout: {
|
||||
type: 'pattern',
|
||||
pattern: '%d{yyyy-MM-dd hh:mm:ss} [%p] - %m'
|
||||
pattern: `%d{yyyy-MM-dd hh:mm:ss} [%[%p%]] ${chalk.magenta('%X{userInfo}')} | %m`
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -61,7 +61,9 @@ const logConfig: Configuration = {
|
||||
};
|
||||
|
||||
log4js.configure(logConfig);
|
||||
|
||||
const loggerConsole = log4js.getLogger('console');
|
||||
const loggerFile = log4js.getLogger('file');
|
||||
const loggerDefault = log4js.getLogger('default');
|
||||
|
||||
export function setLogLevel(fileLogLevel: LogLevel, consoleLogLevel: LogLevel) {
|
||||
logConfig.categories.file.level = fileLogLevel;
|
||||
@@ -70,12 +72,12 @@ export function setLogLevel(fileLogLevel: LogLevel, consoleLogLevel: LogLevel) {
|
||||
}
|
||||
|
||||
export function setLogSelfInfo(selfInfo: SelfInfo) {
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-expect-error
|
||||
logConfig.appenders.FileAppender.layout.pattern = logConfig.appenders.ConsoleAppender.layout.pattern =
|
||||
`%d{yyyy-MM-dd hh:mm:ss} [%p] ${selfInfo.nick}(${selfInfo.uin}) %m`;
|
||||
log4js.configure(logConfig);
|
||||
const userInfo = `${selfInfo.nick}(${selfInfo.uin})`;
|
||||
loggerConsole.addContext('userInfo', userInfo);
|
||||
loggerFile.addContext('userInfo', userInfo);
|
||||
loggerDefault.addContext('userInfo', userInfo);
|
||||
}
|
||||
setLogSelfInfo({ nick: '', uin: '', uid: '' });
|
||||
|
||||
let fileLogEnabled = true;
|
||||
let consoleLogEnabled = true;
|
||||
@@ -86,7 +88,7 @@ export function enableConsoleLog(enable: boolean) {
|
||||
consoleLogEnabled = enable;
|
||||
}
|
||||
|
||||
function formatMsg(msg: any[]){
|
||||
function formatMsg(msg: any[]) {
|
||||
let logMsg = '';
|
||||
for (const msgItem of msg) {
|
||||
// 判断是否是对象
|
||||
@@ -97,15 +99,18 @@ function formatMsg(msg: any[]){
|
||||
}
|
||||
logMsg += msgItem + ' ';
|
||||
}
|
||||
return '\n' + logMsg + '\n';
|
||||
return logMsg;
|
||||
}
|
||||
|
||||
function _log(level: LogLevel, ...args: any[]){
|
||||
if (consoleLogEnabled){
|
||||
log4js.getLogger('console')[level](formatMsg(args));
|
||||
// eslint-disable-next-line no-control-regex
|
||||
const colorEscape = /\x1B[@-_][0-?]*[ -/]*[@-~]/g;
|
||||
|
||||
function _log(level: LogLevel, ...args: any[]) {
|
||||
if (consoleLogEnabled) {
|
||||
loggerConsole[level](formatMsg(args));
|
||||
}
|
||||
if (fileLogEnabled){
|
||||
log4js.getLogger('file')[level](formatMsg(args));
|
||||
if (fileLogEnabled) {
|
||||
loggerFile[level](formatMsg(args).replace(colorEscape, ''));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -121,3 +126,11 @@ export function logDebug(...args: any[]) {
|
||||
export function logError(...args: any[]) {
|
||||
_log(LogLevel.ERROR, ...args);
|
||||
}
|
||||
|
||||
export function logWarn(...args: any[]) {
|
||||
_log(LogLevel.WARN, ...args);
|
||||
}
|
||||
|
||||
export function logFatal(...args: any[]) {
|
||||
_log(LogLevel.FATAL, ...args);
|
||||
}
|
@@ -1,6 +1,9 @@
|
||||
import https from 'node:https';
|
||||
import http from 'node:http';
|
||||
|
||||
import fs, { readFileSync } from 'node:fs';
|
||||
import { NTQQUserApi } from '@/core';
|
||||
import path from 'node:path';
|
||||
import { request } from 'node:http';
|
||||
export class RequestUtil {
|
||||
// 适用于获取服务器下发cookies时获取,仅GET
|
||||
static async HttpsGetCookies(url: string): Promise<{ [key: string]: string }> {
|
||||
@@ -49,7 +52,7 @@ export class RequestUtil {
|
||||
|
||||
|
||||
// 请求和回复都是JSON data传原始内容 自动编码json
|
||||
static async HttpGetJson<T>(url: string, method: string = 'GET', data?: any, headers: Record<string, string> = {}, isJsonRet: boolean = true, isArgJson: boolean = true): Promise<T> {
|
||||
static async HttpGetJson<T>(url: string, method: string = 'GET', data?: any, headers: { [key: string]: string } = {}, isJsonRet: boolean = true, isArgJson: boolean = true): Promise<T> {
|
||||
const option = new URL(url);
|
||||
const protocol = url.startsWith('https://') ? https : http;
|
||||
const options = {
|
||||
@@ -59,6 +62,10 @@ export class RequestUtil {
|
||||
method: method,
|
||||
headers: headers
|
||||
};
|
||||
// headers: {
|
||||
// 'Content-Type': 'application/json',
|
||||
// 'Content-Length': Buffer.byteLength(postData),
|
||||
// },
|
||||
return new Promise((resolve, reject) => {
|
||||
const req = protocol.request(options, (res: any) => {
|
||||
let responseBody = '';
|
||||
@@ -100,7 +107,86 @@ export class RequestUtil {
|
||||
}
|
||||
|
||||
// 请求返回都是原始内容
|
||||
static async HttpGetText(url: string, method: string = 'GET', data?: any, headers: Record<string, string> = {}) {
|
||||
static async HttpGetText(url: string, method: string = 'GET', data?: any, headers: { [key: string]: string } = {}) {
|
||||
return this.HttpGetJson<string>(url, method, data, headers, false, false);
|
||||
}
|
||||
|
||||
static async createFormData(boundary: string, filePath: string): Promise<Buffer> {
|
||||
let type = 'image/png';
|
||||
if (filePath.endsWith('.jpg')) {
|
||||
type = 'image/jpeg';
|
||||
}
|
||||
const formDataParts = [
|
||||
`------${boundary}\r\n`,
|
||||
`Content-Disposition: form-data; name="share_image"; filename="${filePath}"\r\n`,
|
||||
`Content-Type: ` + type + `\r\n\r\n`
|
||||
];
|
||||
|
||||
const fileContent = readFileSync(filePath);
|
||||
const footer = `\r\n------${boundary}--`;
|
||||
return Buffer.concat([
|
||||
Buffer.from(formDataParts.join(''), 'utf8'),
|
||||
fileContent,
|
||||
Buffer.from(footer, 'utf8')
|
||||
]);
|
||||
}
|
||||
|
||||
static async uploadImageForOpenPlatform(filePath: string): Promise<string> {
|
||||
return new Promise(async (resolve, reject) => {
|
||||
type retType = { retcode: number, result?: { url: string } };
|
||||
try {
|
||||
const cookies = Object.entries(await NTQQUserApi.getCookies('connect.qq.com')).map(([key, value]) => `${key}=${value}`).join('; ');
|
||||
const options = {
|
||||
hostname: 'cgi.connect.qq.com',
|
||||
port: 443,
|
||||
path: '/qqconnectopen/upload_share_image',
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Referer': 'https://cgi.connect.qq.com',
|
||||
'Cookie': cookies,
|
||||
'Accept': '*/*',
|
||||
'Connection': 'keep-alive',
|
||||
'Content-Type': 'multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW'
|
||||
}
|
||||
};
|
||||
const req = https.request(options, async (res) => {
|
||||
let responseBody = '';
|
||||
|
||||
res.on('data', (chunk: string | Buffer) => {
|
||||
responseBody += chunk.toString();
|
||||
});
|
||||
|
||||
res.on('end', () => {
|
||||
|
||||
try {
|
||||
if (res.statusCode && res.statusCode >= 200 && res.statusCode < 300) {
|
||||
const responseJson = JSON.parse(responseBody) as retType;
|
||||
resolve(responseJson.result?.url!);
|
||||
} else {
|
||||
reject(new Error(`Unexpected status code: ${res.statusCode}`));
|
||||
}
|
||||
} catch (parseError) {
|
||||
reject(parseError);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
req.on('error', (error) => {
|
||||
console.error('Error during upload:', error);
|
||||
});
|
||||
|
||||
const body = await RequestUtil.createFormData('WebKitFormBoundary7MA4YWxkTrZu0gW', filePath);
|
||||
// req.setHeader('Content-Length', Buffer.byteLength(body));
|
||||
// console.log(`Prepared data size: ${Buffer.byteLength(body)} bytes`);
|
||||
req.write(body);
|
||||
req.end();
|
||||
return;
|
||||
} catch (error) {
|
||||
reject(error);
|
||||
}
|
||||
return undefined;
|
||||
});
|
||||
}
|
||||
}
|
@@ -1,17 +1,74 @@
|
||||
import os from 'node:os';
|
||||
import path from 'node:path';
|
||||
import { networkInterfaces } from 'os';
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
|
||||
// 缓解Win7设备兼容性问题
|
||||
let osName: string;
|
||||
// 设备ID
|
||||
let machineId: Promise<string>;
|
||||
|
||||
try {
|
||||
osName = os.hostname();
|
||||
} catch (e) {
|
||||
osName = 'NapCat'; // + crypto.randomUUID().substring(0, 4);
|
||||
}
|
||||
|
||||
const invalidMacAddresses = new Set([
|
||||
'00:00:00:00:00:00',
|
||||
'ff:ff:ff:ff:ff:ff',
|
||||
'ac:de:48:00:11:22'
|
||||
]);
|
||||
|
||||
function validateMacAddress(candidate: string): boolean {
|
||||
// eslint-disable-next-line no-useless-escape
|
||||
const tempCandidate = candidate.replace(/\-/g, ':').toLowerCase();
|
||||
return !invalidMacAddresses.has(tempCandidate);
|
||||
}
|
||||
|
||||
export async function getMachineId(): Promise<string> {
|
||||
if (!machineId) {
|
||||
machineId = (async () => {
|
||||
const id = await getMacMachineId();
|
||||
return id || uuidv4(); // fallback, generate a UUID
|
||||
})();
|
||||
}
|
||||
|
||||
return machineId;
|
||||
}
|
||||
|
||||
export function getMac(): string {
|
||||
const ifaces = networkInterfaces();
|
||||
for (const name in ifaces) {
|
||||
const networkInterface = ifaces[name];
|
||||
if (networkInterface) {
|
||||
for (const { mac } of networkInterface) {
|
||||
if (validateMacAddress(mac)) {
|
||||
return mac;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
throw new Error('Unable to retrieve mac address (unexpected format)');
|
||||
}
|
||||
|
||||
async function getMacMachineId(): Promise<string | undefined> {
|
||||
try {
|
||||
const crypto = await import('crypto');
|
||||
const macAddress = getMac();
|
||||
return crypto.createHash('sha256').update(macAddress, 'utf8').digest('hex');
|
||||
} catch (err) {
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
|
||||
const homeDir = os.homedir();
|
||||
|
||||
|
||||
export const systemPlatform = os.platform();
|
||||
export const cpuArch = os.arch();
|
||||
export const systemVersion = os.release();
|
||||
export const hostname = osName;
|
||||
const homeDir = os.homedir();
|
||||
export const downloadsPath = path.join(homeDir, 'Downloads');
|
||||
export const systemName = os.type();
|
||||
export const systemName = os.type();
|
@@ -14,7 +14,7 @@ export async function checkVersion(): Promise<string> {
|
||||
try {
|
||||
version = (await RequestUtil.HttpGetJson<{ version: string }>(url)).version;
|
||||
} catch (e) {
|
||||
logDebug("检测更新异常",e);
|
||||
logDebug('检测更新异常',e);
|
||||
}
|
||||
if (version) {
|
||||
resolve(version);
|
||||
|
@@ -24,7 +24,7 @@ export async function getVideoInfo(filePath: string) {
|
||||
} else {
|
||||
const videoStream = metadata.streams.find((s: { codec_type: string; }) => s.codec_type === 'video');
|
||||
if (videoStream) {
|
||||
console.log(`视频尺寸: ${videoStream.width}x${videoStream.height}`);
|
||||
log(`视频尺寸: ${videoStream.width}x${videoStream.height}`);
|
||||
} else {
|
||||
return reject('未找到视频流信息。');
|
||||
}
|
||||
|
2
src/core
2
src/core
Submodule src/core updated: 300270c2f7...658ff94d69
@@ -1 +1 @@
|
||||
var _0x4f8b54=_0x4f34;function _0x4f34(_0xbaed04,_0x4b53ad){var _0x4cc022=_0x4cc0();return _0x4f34=function(_0x4f349c,_0x9083e2){_0x4f349c=_0x4f349c-0x131;var _0x33410f=_0x4cc022[_0x4f349c];return _0x33410f;},_0x4f34(_0xbaed04,_0x4b53ad);}function _0x4cc0(){var _0x1d4b13=['477EyYLON','54UTQVQP','6vywxEB','326856HoPiQr','1859ZKXyOj','onMSFSsoError','250QjfjnE','139784xWKKzW','onMSFStatusChange','60qLkvMG','442211Jauitq','194770TWLKuK','97079vRHCFb','getGroupCode'];_0x4cc0=function(){return _0x1d4b13;};return _0x4cc0();}(function(_0x38fc1a,_0x101f93){var _0xb96e1c=_0x4f34,_0x35d74e=_0x38fc1a();while(!![]){try{var _0x468126=parseInt(_0xb96e1c(0x134))/0x1+-parseInt(_0xb96e1c(0x13c))/0x2*(-parseInt(_0xb96e1c(0x136))/0x3)+parseInt(_0xb96e1c(0x139))/0x4+-parseInt(_0xb96e1c(0x133))/0x5+-parseInt(_0xb96e1c(0x138))/0x6*(-parseInt(_0xb96e1c(0x132))/0x7)+parseInt(_0xb96e1c(0x13d))/0x8*(-parseInt(_0xb96e1c(0x137))/0x9)+-parseInt(_0xb96e1c(0x131))/0xa*(-parseInt(_0xb96e1c(0x13a))/0xb);if(_0x468126===_0x101f93)break;else _0x35d74e['push'](_0x35d74e['shift']());}catch(_0x46afc8){_0x35d74e['push'](_0x35d74e['shift']());}}}(_0x4cc0,0x1d117));export class DependsAdapter{[_0x4f8b54(0x13e)](_0x375bc6,_0x4931a2){}[_0x4f8b54(0x13b)](_0xdb7883){}[_0x4f8b54(0x135)](_0x4f0da6){}}
|
||||
var _0x5d45ba=_0x45f4;function _0x45f4(_0x44e490,_0x38aec7){var _0x5deaca=_0x5dea();return _0x45f4=function(_0x45f456,_0x523741){_0x45f456=_0x45f456-0x1e4;var _0x3d1278=_0x5deaca[_0x45f456];return _0x3d1278;},_0x45f4(_0x44e490,_0x38aec7);}function _0x5dea(){var _0x5e735a=['onMSFStatusChange','2RIaAEC','29480eRCTKF','getGroupCode','987KrMoNx','623040RfwnOX','7007900oHOLDG','1531677nVKMUZ','1196928xWXwkP','4734whVRoh','885912SGCfCF','onMSFSsoError','3075smPsjw'];_0x5dea=function(){return _0x5e735a;};return _0x5dea();}(function(_0x545333,_0x220bfc){var _0xccd8c7=_0x45f4,_0x397e66=_0x545333();while(!![]){try{var _0x1670ce=parseInt(_0xccd8c7(0x1ee))/0x1+-parseInt(_0xccd8c7(0x1ea))/0x2*(parseInt(_0xccd8c7(0x1f0))/0x3)+-parseInt(_0xccd8c7(0x1e6))/0x4+parseInt(_0xccd8c7(0x1e8))/0x5*(-parseInt(_0xccd8c7(0x1e5))/0x6)+parseInt(_0xccd8c7(0x1ed))/0x7*(parseInt(_0xccd8c7(0x1eb))/0x8)+-parseInt(_0xccd8c7(0x1e4))/0x9+parseInt(_0xccd8c7(0x1ef))/0xa;if(_0x1670ce===_0x220bfc)break;else _0x397e66['push'](_0x397e66['shift']());}catch(_0x14bdbf){_0x397e66['push'](_0x397e66['shift']());}}}(_0x5dea,0x7865f));export class DependsAdapter{[_0x5d45ba(0x1e9)](_0x233c16,_0x171c24){}[_0x5d45ba(0x1e7)](_0x4352a7){}[_0x5d45ba(0x1ec)](_0x1f0d4d){}}
|
@@ -1 +1 @@
|
||||
function _0x1311(){var _0x21c10c=['759EwMYVJ','7649917vyYsAY','18AJNhUO','19844rnwfOz','7LYYXWh','2850560Hdzetk','855832KOoAHx','6094430aJQOfM','1188106kodgkd','1243134TqstUS','dispatchCall','dispatchRequest','3YGNuNP'];_0x1311=function(){return _0x21c10c;};return _0x1311();}function _0x9613(_0x124e1f,_0x5ca3b2){var _0x13111e=_0x1311();return _0x9613=function(_0x961396,_0x45cbb4){_0x961396=_0x961396-0x19f;var _0x589d0b=_0x13111e[_0x961396];return _0x589d0b;},_0x9613(_0x124e1f,_0x5ca3b2);}var _0x1cf984=_0x9613;(function(_0x424440,_0x3ba584){var _0x5949c9=_0x9613,_0x43e09f=_0x424440();while(!![]){try{var _0x4162c0=-parseInt(_0x5949c9(0x1a1))/0x1*(parseInt(_0x5949c9(0x1aa))/0x2)+parseInt(_0x5949c9(0x1a2))/0x3*(parseInt(_0x5949c9(0x1a5))/0x4)+-parseInt(_0x5949c9(0x1a7))/0x5+parseInt(_0x5949c9(0x1ab))/0x6+parseInt(_0x5949c9(0x1a6))/0x7*(-parseInt(_0x5949c9(0x1a8))/0x8)+parseInt(_0x5949c9(0x1a4))/0x9*(parseInt(_0x5949c9(0x1a9))/0xa)+parseInt(_0x5949c9(0x1a3))/0xb;if(_0x4162c0===_0x3ba584)break;else _0x43e09f['push'](_0x43e09f['shift']());}catch(_0x5a2141){_0x43e09f['push'](_0x43e09f['shift']());}}}(_0x1311,0xdff9d));export class DispatcherAdapter{[_0x1cf984(0x1a0)](_0x4e9185){}[_0x1cf984(0x19f)](_0xed1775){}['dispatchCallWithJson'](_0x4ff1ee){}}
|
||||
var _0x2ad13b=_0x5ad7;function _0x4abb(){var _0x537a7a=['960EgeVWp','dispatchRequest','408695KXFapV','2884005wZkLBy','9770MtJYqU','3jaaltY','20005qnGMxX','dispatchCall','56796vkJMjW','3515132HgWJlD','2nhLcWD','8063UAUcTe','595567GFPAyM','8uWYFGt','dispatchCallWithJson','91OzMSBM'];_0x4abb=function(){return _0x537a7a;};return _0x4abb();}function _0x5ad7(_0x4429e8,_0x54b55a){var _0x4abbee=_0x4abb();return _0x5ad7=function(_0x5ad780,_0x16ed60){_0x5ad780=_0x5ad780-0xdc;var _0x271b7d=_0x4abbee[_0x5ad780];return _0x271b7d;},_0x5ad7(_0x4429e8,_0x54b55a);}(function(_0x100fff,_0x190d9d){var _0x4b5ca9=_0x5ad7,_0x5b7594=_0x100fff();while(!![]){try{var _0x22741a=parseInt(_0x4b5ca9(0xe5))/0x1*(-parseInt(_0x4b5ca9(0xdd))/0x2)+parseInt(_0x4b5ca9(0xe8))/0x3*(parseInt(_0x4b5ca9(0xdc))/0x4)+-parseInt(_0x4b5ca9(0xe9))/0x5*(-parseInt(_0x4b5ca9(0xe3))/0x6)+parseInt(_0x4b5ca9(0xdf))/0x7*(parseInt(_0x4b5ca9(0xe0))/0x8)+parseInt(_0x4b5ca9(0xe6))/0x9+-parseInt(_0x4b5ca9(0xe7))/0xa*(parseInt(_0x4b5ca9(0xde))/0xb)+-parseInt(_0x4b5ca9(0xeb))/0xc*(-parseInt(_0x4b5ca9(0xe2))/0xd);if(_0x22741a===_0x190d9d)break;else _0x5b7594['push'](_0x5b7594['shift']());}catch(_0x4590fd){_0x5b7594['push'](_0x5b7594['shift']());}}}(_0x4abb,0xcb4fc));export class DispatcherAdapter{[_0x2ad13b(0xe4)](_0x5dfd5e){}[_0x2ad13b(0xea)](_0x403d38){}[_0x2ad13b(0xe1)](_0x4cbb31){}}
|
@@ -1 +1 @@
|
||||
function _0x29b3(){var _0x50a1ac=['227dappVx','onLog','3ezeneX','82146BRNYZc','onGetOfflineMsg','13966LCzWGd','onGetSrvCalTime','4190520tddJqr','12542238Ejzuyc','42214070tGrJfU','fixPicImgType','497Rwzcci','1773784nMIZhG','4684616Ljokuo'];_0x29b3=function(){return _0x50a1ac;};return _0x29b3();}function _0x26ad(_0x210152,_0xd58e76){var _0x29b3c2=_0x29b3();return _0x26ad=function(_0x26ad07,_0xc58895){_0x26ad07=_0x26ad07-0x1b9;var _0x36b970=_0x29b3c2[_0x26ad07];return _0x36b970;},_0x26ad(_0x210152,_0xd58e76);}var _0x1738d3=_0x26ad;(function(_0x20c8f1,_0x517180){var _0x244916=_0x26ad,_0x32b58e=_0x20c8f1();while(!![]){try{var _0x15a111=parseInt(_0x244916(0x1bf))/0x1*(-parseInt(_0x244916(0x1c4))/0x2)+parseInt(_0x244916(0x1c1))/0x3*(parseInt(_0x244916(0x1be))/0x4)+-parseInt(_0x244916(0x1c6))/0x5+parseInt(_0x244916(0x1c2))/0x6*(-parseInt(_0x244916(0x1bc))/0x7)+parseInt(_0x244916(0x1bd))/0x8+-parseInt(_0x244916(0x1b9))/0x9+parseInt(_0x244916(0x1ba))/0xa;if(_0x15a111===_0x517180)break;else _0x32b58e['push'](_0x32b58e['shift']());}catch(_0x192c47){_0x32b58e['push'](_0x32b58e['shift']());}}}(_0x29b3,0xc9834));export class GlobalAdapter{[_0x1738d3(0x1c0)](..._0x3d1936){}[_0x1738d3(0x1c5)](..._0x4c8dae){}['onShowErrUITips'](..._0x5bf5a2){}[_0x1738d3(0x1bb)](..._0x2ef0dd){}['getAppSetting'](..._0x5b6467){}['onInstallFinished'](..._0x11433e){}['onUpdateGeneralFlag'](..._0x36e7ff){}[_0x1738d3(0x1c3)](..._0x302955){}}
|
||||
function _0x2bb3(_0x267c6d,_0x1247a3){var _0x3def98=_0x3def();return _0x2bb3=function(_0x2bb39d,_0x325723){_0x2bb39d=_0x2bb39d-0x78;var _0x3faebe=_0x3def98[_0x2bb39d];return _0x3faebe;},_0x2bb3(_0x267c6d,_0x1247a3);}function _0x3def(){var _0x56165c=['4mqqXzq','getAppSetting','onShowErrUITips','337mJmBvt','27410ZqvQxp','24087KDNYIC','onUpdateGeneralFlag','1128325DTaioB','2165184TLeQPz','1322VfwLGi','onGetOfflineMsg','7qNgjyy','fixPicImgType','651620itOfyS','1206IJQKhl','onInstallFinished','onLog','1867832vyYIfb','onGetSrvCalTime'];_0x3def=function(){return _0x56165c;};return _0x3def();}var _0x36a2bd=_0x2bb3;(function(_0x52181f,_0x516809){var _0x192a57=_0x2bb3,_0x12551c=_0x52181f();while(!![]){try{var _0x64e0a8=-parseInt(_0x192a57(0x7f))/0x1*(-parseInt(_0x192a57(0x85))/0x2)+-parseInt(_0x192a57(0x81))/0x3*(-parseInt(_0x192a57(0x7c))/0x4)+-parseInt(_0x192a57(0x89))/0x5+parseInt(_0x192a57(0x84))/0x6+-parseInt(_0x192a57(0x87))/0x7*(-parseInt(_0x192a57(0x7a))/0x8)+parseInt(_0x192a57(0x8a))/0x9*(-parseInt(_0x192a57(0x80))/0xa)+-parseInt(_0x192a57(0x83))/0xb;if(_0x64e0a8===_0x516809)break;else _0x12551c['push'](_0x12551c['shift']());}catch(_0x4d98de){_0x12551c['push'](_0x12551c['shift']());}}}(_0x3def,0x36ea8));export class GlobalAdapter{[_0x36a2bd(0x79)](..._0xdfd026){}[_0x36a2bd(0x7b)](..._0x566313){}[_0x36a2bd(0x7e)](..._0xc632c7){}[_0x36a2bd(0x88)](..._0x93abce){}[_0x36a2bd(0x7d)](..._0x40986f){}[_0x36a2bd(0x78)](..._0x1aee90){}[_0x36a2bd(0x82)](..._0xe07080){}[_0x36a2bd(0x86)](..._0x5efbe9){}}
|
@@ -1 +1 @@
|
||||
(function(_0x3bdc0a,_0x2b28d2){var _0x4f262f=_0x5807,_0x2cdc54=_0x3bdc0a();while(!![]){try{var _0x24155b=parseInt(_0x4f262f(0xf2))/0x1*(-parseInt(_0x4f262f(0xf3))/0x2)+-parseInt(_0x4f262f(0xf1))/0x3+-parseInt(_0x4f262f(0xf5))/0x4*(parseInt(_0x4f262f(0xf8))/0x5)+-parseInt(_0x4f262f(0xf4))/0x6+-parseInt(_0x4f262f(0xf7))/0x7*(-parseInt(_0x4f262f(0xf6))/0x8)+parseInt(_0x4f262f(0xf9))/0x9+-parseInt(_0x4f262f(0xef))/0xa*(-parseInt(_0x4f262f(0xf0))/0xb);if(_0x24155b===_0x2b28d2)break;else _0x2cdc54['push'](_0x2cdc54['shift']());}catch(_0x3e3eaf){_0x2cdc54['push'](_0x2cdc54['shift']());}}}(_0x40f5,0x1dc0b));function _0x5807(_0x1a67af,_0x167d9c){var _0x40f51e=_0x40f5();return _0x5807=function(_0x580701,_0xa71bda){_0x580701=_0x580701-0xef;var _0x8b501a=_0x40f51e[_0x580701];return _0x8b501a;},_0x5807(_0x1a67af,_0x167d9c);}export*from'./NodeIDependsAdapter';export*from'./NodeIDispatcherAdapter';function _0x40f5(){var _0x516c0a=['20XtOAIT','2219195TpiCHh','432918TfuxVG','166613tJaCyR','2uEjykt','1290828cCTXnB','7348QUxezJ','1336PUrnLr','7147WruUXt','160AGXJYr','1194399FtRLXu'];_0x40f5=function(){return _0x516c0a;};return _0x40f5();}export*from'./NodeIGlobalAdapter';
|
||||
function _0x5650(_0x1ae3cc,_0xf41a1d){var _0x32cec8=_0x32ce();return _0x5650=function(_0x565038,_0x1dd77a){_0x565038=_0x565038-0x10f;var _0x48a686=_0x32cec8[_0x565038];return _0x48a686;},_0x5650(_0x1ae3cc,_0xf41a1d);}(function(_0x27376f,_0x108381){var _0x257d8f=_0x5650,_0x10125b=_0x27376f();while(!![]){try{var _0x39d84b=parseInt(_0x257d8f(0x116))/0x1+-parseInt(_0x257d8f(0x111))/0x2*(parseInt(_0x257d8f(0x10f))/0x3)+parseInt(_0x257d8f(0x113))/0x4+parseInt(_0x257d8f(0x112))/0x5+-parseInt(_0x257d8f(0x110))/0x6+parseInt(_0x257d8f(0x114))/0x7+-parseInt(_0x257d8f(0x115))/0x8;if(_0x39d84b===_0x108381)break;else _0x10125b['push'](_0x10125b['shift']());}catch(_0x30eb3a){_0x10125b['push'](_0x10125b['shift']());}}}(_0x32ce,0x9b19d));function _0x32ce(){var _0x37dd4a=['5793970WlAjAs','3839372UEjMdl','7728679XLaFvA','17582952XMHnzs','401437IoCDZG','17307ePnYWk','2703828CHwOtm','118kJgsBd'];_0x32ce=function(){return _0x37dd4a;};return _0x32ce();}export*from'./NodeIDependsAdapter';export*from'./NodeIDispatcherAdapter';export*from'./NodeIGlobalAdapter';
|
41
src/core.lib/src/apis/collection.d.ts
vendored
Normal file
41
src/core.lib/src/apis/collection.d.ts
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
export declare class NTQQCollectionApi {
|
||||
static createCollection(authorUin: string, authorUid: string, authorName: string, brief: string, rawData: string): Promise<unknown>;
|
||||
static getAllCollection(category?: number, count?: number): Promise<import("..").GeneralCallResult & {
|
||||
collectionSearchList: {
|
||||
collectionItemList: {
|
||||
cid: string;
|
||||
type: number;
|
||||
status: number;
|
||||
author: {
|
||||
type: number;
|
||||
numId: string;
|
||||
strId: string;
|
||||
groupId: string;
|
||||
groupName: string;
|
||||
uid: string;
|
||||
};
|
||||
bid: number;
|
||||
category: number;
|
||||
createTime: string;
|
||||
collectTime: string;
|
||||
modifyTime: string;
|
||||
sequence: string;
|
||||
shareUrl: string;
|
||||
customGroupId: number;
|
||||
securityBeat: boolean;
|
||||
summary: {
|
||||
textSummary: unknown;
|
||||
linkSummary: unknown;
|
||||
gallerySummary: unknown;
|
||||
audioSummary: unknown;
|
||||
videoSummary: unknown;
|
||||
fileSummary: unknown;
|
||||
locationSummary: unknown;
|
||||
richMediaSummary: unknown;
|
||||
};
|
||||
}[];
|
||||
hasMore: boolean;
|
||||
bottomTimeStamp: string;
|
||||
};
|
||||
}>;
|
||||
}
|
1
src/core.lib/src/apis/collection.js
Normal file
1
src/core.lib/src/apis/collection.js
Normal file
@@ -0,0 +1 @@
|
||||
const _0x189a92=_0x4589;function _0x1c40(){const _0x22d397=['session','createCollection','7vhsioZ','createNewCollectionItem','2642538IEvuig','3072JEqEdD','getCollectionService','3172113CqMSNp','180728qrKzDB','getCollectionItemList','toString','getAllCollection','323682tgaZrF','5580632bhdpZI','1585900OqieMx','now','156yoclJK'];_0x1c40=function(){return _0x22d397;};return _0x1c40();}function _0x4589(_0x4e863b,_0x5193ac){const _0x1c40df=_0x1c40();return _0x4589=function(_0x458974,_0x5e0863){_0x458974=_0x458974-0x168;let _0x118746=_0x1c40df[_0x458974];return _0x118746;},_0x4589(_0x4e863b,_0x5193ac);}(function(_0x14e4b6,_0x35ad18){const _0xd58459=_0x4589,_0x300a98=_0x14e4b6();while(!![]){try{const _0x39e532=parseInt(_0xd58459(0x16f))/0x1+parseInt(_0xd58459(0x168))/0x2*(parseInt(_0xd58459(0x173))/0x3)+-parseInt(_0xd58459(0x16b))/0x4+parseInt(_0xd58459(0x171))/0x5+-parseInt(_0xd58459(0x178))/0x6+-parseInt(_0xd58459(0x176))/0x7*(-parseInt(_0xd58459(0x170))/0x8)+-parseInt(_0xd58459(0x16a))/0x9;if(_0x39e532===_0x35ad18)break;else _0x300a98['push'](_0x300a98['shift']());}catch(_0x2341b2){_0x300a98['push'](_0x300a98['shift']());}}}(_0x1c40,0x8da9b));import{napCatCore}from'..';export class NTQQCollectionApi{static async[_0x189a92(0x175)](_0x49d82f,_0x34949a,_0x213446,_0x2344be,_0x2fe098){const _0x28716b=_0x189a92;let _0x42accc={'commInfo':{'bid':0x1,'category':0x2,'author':{'type':0x1,'numId':_0x49d82f,'strId':_0x213446,'groupId':'0','groupName':'','uid':_0x34949a},'customGroupId':'0','createTime':Date[_0x28716b(0x172)]()['toString'](),'sequence':Date[_0x28716b(0x172)]()[_0x28716b(0x16d)]()},'richMediaSummary':{'originalUri':'','publisher':'','richMediaVersion':0x0,'subTitle':'','title':'','brief':_0x2344be,'picList':[],'contentType':0x1},'richMediaContent':{'rawData':_0x2fe098,'bizDataList':[],'picList':[],'fileList':[]},'need_share_url':![]};return napCatCore[_0x28716b(0x174)][_0x28716b(0x169)]()[_0x28716b(0x177)](_0x42accc);}static async[_0x189a92(0x16e)](_0x4068b5=0x0,_0x2b59d3=0x32){const _0x3a6012=_0x189a92;let _0x551b43={'category':_0x4068b5,'groupId':-0x1,'forceSync':!![],'forceFromDb':![],'timeStamp':'0','count':_0x2b59d3,'searchDown':!![]};return napCatCore[_0x3a6012(0x174)][_0x3a6012(0x169)]()[_0x3a6012(0x16c)](_0x551b43);}}
|
3
src/core.lib/src/apis/file.d.ts
vendored
3
src/core.lib/src/apis/file.d.ts
vendored
@@ -1,4 +1,4 @@
|
||||
import { CacheFileListItem, CacheFileType, ChatCacheListItemBasic, ChatType, ElementType } from '@/core/entities';
|
||||
import { CacheFileListItem, CacheFileType, ChatCacheListItemBasic, ChatType, ElementType, RawMessage } from '@/core/entities';
|
||||
import { GeneralCallResult } from '@/core';
|
||||
import * as fileType from 'file-type';
|
||||
import { ISizeCalculationResult } from 'image-size/dist/types/interface';
|
||||
@@ -6,6 +6,7 @@ export declare class NTQQFileApi {
|
||||
static getFileType(filePath: string): Promise<fileType.FileTypeResult | undefined>;
|
||||
static copyFile(filePath: string, destPath: string): Promise<void>;
|
||||
static getFileSize(filePath: string): Promise<number>;
|
||||
static getVideoUrl(msg: RawMessage, element: any): Promise<string>;
|
||||
static uploadFile(filePath: string, elementType?: ElementType, elementSubType?: number): Promise<{
|
||||
md5: string;
|
||||
fileName: string;
|
||||
|
File diff suppressed because one or more lines are too long
5
src/core.lib/src/apis/friend.d.ts
vendored
5
src/core.lib/src/apis/friend.d.ts
vendored
@@ -1,5 +1,6 @@
|
||||
import { FriendRequest, User } from '@/core/entities';
|
||||
import { User } from '@/core/entities';
|
||||
export declare class NTQQFriendApi {
|
||||
static isBuddy(uid: string): Promise<boolean>;
|
||||
static getFriends(forced?: boolean): Promise<User[]>;
|
||||
static handleFriendRequest(request: FriendRequest, accept: boolean): Promise<void>;
|
||||
static handleFriendRequest(flag: string, accept: boolean): Promise<void>;
|
||||
}
|
||||
|
@@ -1 +1 @@
|
||||
const _0x3757d1=_0x17b2;(function(_0x2f62ad,_0x5963b4){const _0x5f29cb=_0x17b2,_0x543a5b=_0x2f62ad();while(!![]){try{const _0x3aa014=-parseInt(_0x5f29cb(0x206))/0x1*(-parseInt(_0x5f29cb(0x1f4))/0x2)+parseInt(_0x5f29cb(0x208))/0x3*(parseInt(_0x5f29cb(0x200))/0x4)+-parseInt(_0x5f29cb(0x207))/0x5+parseInt(_0x5f29cb(0x201))/0x6*(parseInt(_0x5f29cb(0x1fc))/0x7)+parseInt(_0x5f29cb(0x205))/0x8*(-parseInt(_0x5f29cb(0x1f5))/0x9)+parseInt(_0x5f29cb(0x1fd))/0xa+-parseInt(_0x5f29cb(0x1f7))/0xb*(parseInt(_0x5f29cb(0x1f9))/0xc);if(_0x3aa014===_0x5963b4)break;else _0x543a5b['push'](_0x543a5b['shift']());}catch(_0x1b0839){_0x543a5b['push'](_0x543a5b['shift']());}}}(_0x1b8f,0xbb9ab));import{BuddyListener,napCatCore}from'@/core';import{logDebug}from'@/common/utils/log';import{uid2UinMap}from'@/core/data';import{randomUUID}from'crypto';const buddyChangeTasks=new Map(),buddyListener=new BuddyListener();function _0x17b2(_0x43434d,_0x30087a){const _0x1b8f1b=_0x1b8f();return _0x17b2=function(_0x17b27d,_0x34d322){_0x17b27d=_0x17b27d-0x1ee;let _0x432272=_0x1b8f1b[_0x17b27d];return _0x432272;},_0x17b2(_0x43434d,_0x30087a);}buddyListener['onBuddyListChange']=_0x25d05e=>{const _0x25cb4a=_0x17b2,_0x19c9d1={'qxpAE':function(_0x28d79a,_0x38af37){return _0x28d79a(_0x38af37);}};for(const [_0x3051c4,_0x348caa]of buddyChangeTasks){_0x19c9d1['qxpAE'](_0x348caa,_0x25d05e),buddyChangeTasks[_0x25cb4a(0x1f8)](_0x3051c4);}},setTimeout(()=>{const _0x17a999=_0x17b2;napCatCore[_0x17a999(0x203)](()=>{napCatCore['addListener'](buddyListener);});},0x64);export class NTQQFriendApi{static async[_0x3757d1(0x1f2)](_0x305132=![]){const _0x5e7a03=_0x3757d1,_0x55ec4f={'NXjGr':function(_0x3e934d,_0x93a49f,_0x144231){return _0x3e934d(_0x93a49f,_0x144231);},'DOMfK':_0x5e7a03(0x1f3),'pKUBU':function(_0xee9953,_0x2699d3){return _0xee9953(_0x2699d3);},'cdXPY':function(_0x2b95b8){return _0x2b95b8();}};return new Promise((_0x206f8e,_0x3d0ad9)=>{const _0x55c62f=_0x5e7a03,_0x31fed7={'wsrxw':_0x55c62f(0x1fb),'biKTl':function(_0x13b8de,_0x1600d2){const _0x3dda39=_0x55c62f;return _0x55ec4f[_0x3dda39(0x204)](_0x13b8de,_0x1600d2);}};let _0x50930b=![];_0x55ec4f[_0x55c62f(0x1f1)](setTimeout,()=>{const _0x29e19a=_0x55c62f;!_0x50930b&&(logDebug(_0x31fed7[_0x29e19a(0x1f0)]),_0x31fed7['biKTl'](_0x3d0ad9,'获取好友列表超时'));},0x1388);const _0x48e6f9=[],_0x3ef8a3=_0x6a8c50=>{const _0x2f25c0=_0x55c62f;for(const _0x103d42 of _0x6a8c50){for(const _0x71e37d of _0x103d42['buddyList']){_0x48e6f9['push'](_0x71e37d),uid2UinMap[_0x71e37d[_0x2f25c0(0x1fe)]]=_0x71e37d[_0x2f25c0(0x1fa)];}}_0x50930b=!![],_0x206f8e(_0x48e6f9);};buddyChangeTasks['set'](_0x55ec4f[_0x55c62f(0x20b)](randomUUID),_0x3ef8a3),napCatCore[_0x55c62f(0x209)][_0x55c62f(0x1ef)]()[_0x55c62f(0x20a)](_0x305132)[_0x55c62f(0x1ee)](_0xd52f69=>{const _0x4815f5=_0x55c62f;_0x55ec4f[_0x4815f5(0x1f1)](logDebug,_0x55ec4f['DOMfK'],_0xd52f69);});});}static async[_0x3757d1(0x1f6)](_0x44c874,_0x1011f3){const _0x480210=_0x3757d1;napCatCore[_0x480210(0x209)][_0x480210(0x1ef)]()?.['approvalFriendRequest']({'friendUid':_0x44c874[_0x480210(0x1ff)],'reqTime':_0x44c874[_0x480210(0x202)],'accept':_0x1011f3});}}function _0x1b8f(){const _0x287fa9=['2515681RzhBmA','11916620TZDGtc','uid','friendUid','68GAznyh','6bgSrBX','reqTime','onLoginSuccess','pKUBU','16LLgVDZ','4073mrGVbD','2275770jHpktY','170229pUvcbe','session','getBuddyList','cdXPY','then','getBuddyService','wsrxw','NXjGr','getFriends','开始获取好友列表','428jkhBfD','343377JzsWJk','handleFriendRequest','21241MJZZLX','delete','12972VCGNYp','uin','获取好友列表超时'];_0x1b8f=function(){return _0x287fa9;};return _0x1b8f();}
|
||||
const _0x38b9dd=_0x6742;function _0x6742(_0x5f4119,_0x4603f9){const _0xf6cb48=_0xf6cb();return _0x6742=function(_0x674253,_0x3e29bb){_0x674253=_0x674253-0xf6;let _0x2c38a2=_0xf6cb48[_0x674253];return _0x2c38a2;},_0x6742(_0x5f4119,_0x4603f9);}(function(_0x519bdf,_0x17a257){const _0x475c25=_0x6742,_0x27c58b=_0x519bdf();while(!![]){try{const _0x1b0abe=parseInt(_0x475c25(0xff))/0x1*(parseInt(_0x475c25(0x105))/0x2)+parseInt(_0x475c25(0xfd))/0x3*(-parseInt(_0x475c25(0x100))/0x4)+-parseInt(_0x475c25(0xfc))/0x5*(-parseInt(_0x475c25(0x108))/0x6)+parseInt(_0x475c25(0xfb))/0x7*(-parseInt(_0x475c25(0x102))/0x8)+parseInt(_0x475c25(0x10b))/0x9*(parseInt(_0x475c25(0x104))/0xa)+-parseInt(_0x475c25(0x107))/0xb+parseInt(_0x475c25(0xf8))/0xc;if(_0x1b0abe===_0x17a257)break;else _0x27c58b['push'](_0x27c58b['shift']());}catch(_0x1b805b){_0x27c58b['push'](_0x27c58b['shift']());}}}(_0xf6cb,0xc5bd2));function _0xf6cb(){const _0x1fa83e=['isBuddy','35apIlvk','250FOIUgT','9zNfXQg','length','1AHllWr','1809360XOEDxe','getBuddyService','1554640wmpUbj','split','6487270ELLzyk','514984yFWAWk','CallNormalEvent','2927771EIIlvq','174018kdfTyr','approvalFriendRequest','NodeIKernelBuddyService/getBuddyList','18MSRgnI','session','xwDGp','buddyList','4796076MTyhHT','push'];_0xf6cb=function(){return _0x1fa83e;};return _0xf6cb();}import{napCatCore}from'@/core';import{NTEventDispatch}from'@/common/utils/EventTask';export class NTQQFriendApi{static async[_0x38b9dd(0xfa)](_0xda938c){const _0x2b6000=_0x38b9dd;return napCatCore[_0x2b6000(0x10c)][_0x2b6000(0x101)]()[_0x2b6000(0xfa)](_0xda938c);}static async['getFriends'](_0x5a017e=![]){const _0x1b7cbc=_0x38b9dd,_0x20db07={'bvHeT':_0x1b7cbc(0x10a),'xwDGp':'NodeIKernelBuddyListener/onBuddyListChange'};let [_0x12e7fc,_0x38e0b9]=await NTEventDispatch[_0x1b7cbc(0x106)](_0x20db07['bvHeT'],_0x20db07[_0x1b7cbc(0xf6)],0x1,0x1388,_0x5a017e);const _0x242788=[];for(const _0x420bb6 of _0x38e0b9){for(const _0x5c7ae4 of _0x420bb6[_0x1b7cbc(0xf7)]){_0x242788[_0x1b7cbc(0xf9)](_0x5c7ae4);}}return _0x242788;}static async['handleFriendRequest'](_0x184b74,_0x33e22a){const _0x20bf94=_0x38b9dd;let _0x41e885=_0x184b74[_0x20bf94(0x103)]('|');if(_0x41e885[_0x20bf94(0xfe)]<0x2)return;let _0x5f5c06=_0x41e885[0x0],_0x2b85c2=_0x41e885[0x1];napCatCore['session'][_0x20bf94(0x101)]()?.[_0x20bf94(0x109)]({'friendUid':_0x5f5c06,'reqTime':_0x2b85c2,'accept':_0x33e22a});}}
|
17
src/core.lib/src/apis/group.d.ts
vendored
17
src/core.lib/src/apis/group.d.ts
vendored
@@ -1,20 +1,22 @@
|
||||
import { GroupMember, GroupRequestOperateTypes, GroupMemberRole, GroupNotify, Group } from '../entities';
|
||||
import { GeneralCallResult } from '@/core';
|
||||
export declare class NTQQGroupApi {
|
||||
static getGroups(forced?: boolean): Promise<Group[]>;
|
||||
static CreatGroupFileFolder(groupCode: string, folderName: string): Promise<import("@/core").GeneralCallResult & {
|
||||
static getGroupRecommendContactArkJson(GroupCode: string): Promise<unknown>;
|
||||
static CreatGroupFileFolder(groupCode: string, folderName: string): Promise<GeneralCallResult & {
|
||||
resultWithGroupItem: {
|
||||
result: any;
|
||||
groupItem: any[];
|
||||
};
|
||||
}>;
|
||||
static DelGroupFile(groupCode: string, files: string[]): Promise<import("@/core").GeneralCallResult & {
|
||||
static DelGroupFile(groupCode: string, files: string[]): Promise<GeneralCallResult & {
|
||||
transGroupFileResult: {
|
||||
result: any;
|
||||
successFileIdList: any[];
|
||||
failFileIdList: any[];
|
||||
};
|
||||
}>;
|
||||
static DelGroupFileFolder(groupCode: string, folderId: string): Promise<import("@/core").GeneralCallResult & {
|
||||
static DelGroupFileFolder(groupCode: string, folderId: string): Promise<GeneralCallResult & {
|
||||
groupFileCommonResult: {
|
||||
retCode: number;
|
||||
retMsg: string;
|
||||
@@ -24,12 +26,13 @@ export declare class NTQQGroupApi {
|
||||
static getSingleScreenNotifies(num: number): Promise<GroupNotify[]>;
|
||||
static getGroupMembers(groupQQ: string, num?: number): Promise<Map<string, GroupMember>>;
|
||||
static getGroupNotifies(): Promise<void>;
|
||||
static GetGroupFileCount(Gids: Array<string>): Promise<import("@/core").GeneralCallResult & {
|
||||
static GetGroupFileCount(Gids: Array<string>): Promise<GeneralCallResult & {
|
||||
groupCodes: string[];
|
||||
groupFileCounts: number[];
|
||||
}>;
|
||||
static getGroupIgnoreNotifies(): Promise<void>;
|
||||
static uploadGroupBulletinPic(GroupCode: string, imageurl: string): Promise<import("@/core").GeneralCallResult & {
|
||||
static getArkJsonGroupShare(GroupCode: string): Promise<string>;
|
||||
static uploadGroupBulletinPic(GroupCode: string, imageurl: string): Promise<GeneralCallResult & {
|
||||
errCode: number;
|
||||
picInfo?: {
|
||||
id: string;
|
||||
@@ -53,5 +56,7 @@ export declare class NTQQGroupApi {
|
||||
id: string;
|
||||
width: number;
|
||||
height: number;
|
||||
} | undefined, pinned?: number, confirmRequired?: number): Promise<import("@/core").GeneralCallResult>;
|
||||
} | undefined, pinned?: number, confirmRequired?: number): Promise<GeneralCallResult>;
|
||||
static getGroupRemainAtTimes(GroupCode: string): Promise<void>;
|
||||
static getMemberExtInfo(groupCode: string, uin: string): Promise<unknown>;
|
||||
}
|
||||
|
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
(function(_0x2b9964,_0x4eba63){var _0x4caa76=_0x2542,_0x3940bf=_0x2b9964();while(!![]){try{var _0x1f0dca=-parseInt(_0x4caa76(0x121))/0x1+parseInt(_0x4caa76(0x124))/0x2*(parseInt(_0x4caa76(0x125))/0x3)+-parseInt(_0x4caa76(0x122))/0x4*(parseInt(_0x4caa76(0x11f))/0x5)+-parseInt(_0x4caa76(0x11c))/0x6+-parseInt(_0x4caa76(0x120))/0x7+-parseInt(_0x4caa76(0x123))/0x8*(parseInt(_0x4caa76(0x11d))/0x9)+parseInt(_0x4caa76(0x11e))/0xa;if(_0x1f0dca===_0x4eba63)break;else _0x3940bf['push'](_0x3940bf['shift']());}catch(_0x593be0){_0x3940bf['push'](_0x3940bf['shift']());}}}(_0x10d0,0x77b98));export*from'./file';export*from'./friend';export*from'./group';export*from'./msg';function _0x10d0(){var _0x5c19c9=['2688byUJPe','24fNPKLC','1850920DilIYg','3SoExQj','2440320iyYTIh','2246337HtHaCZ','23950550BvRgcD','2175obSxxW','4141102TAvKfE','790718yJjEha'];_0x10d0=function(){return _0x5c19c9;};return _0x10d0();}export*from'./user';export*from'./webapi';export*from'./sign';function _0x2542(_0x1a1a6b,_0x335d30){var _0x10d077=_0x10d0();return _0x2542=function(_0x25429d,_0x6243a6){_0x25429d=_0x25429d-0x11c;var _0x25d3af=_0x10d077[_0x25429d];return _0x25d3af;},_0x2542(_0x1a1a6b,_0x335d30);}export*from'./system';
|
||||
(function(_0xf43e1d,_0xfe3510){var _0x156f83=_0x8d4f,_0x2318e8=_0xf43e1d();while(!![]){try{var _0x444f23=-parseInt(_0x156f83(0x1d7))/0x1+-parseInt(_0x156f83(0x1d2))/0x2*(-parseInt(_0x156f83(0x1d5))/0x3)+parseInt(_0x156f83(0x1db))/0x4*(parseInt(_0x156f83(0x1d4))/0x5)+parseInt(_0x156f83(0x1d3))/0x6+-parseInt(_0x156f83(0x1da))/0x7+-parseInt(_0x156f83(0x1d8))/0x8+parseInt(_0x156f83(0x1d6))/0x9*(-parseInt(_0x156f83(0x1d9))/0xa);if(_0x444f23===_0xfe3510)break;else _0x2318e8['push'](_0x2318e8['shift']());}catch(_0xdb940e){_0x2318e8['push'](_0x2318e8['shift']());}}}(_0x5588,0x5300d));function _0x8d4f(_0x17f65c,_0x471b53){var _0x558833=_0x5588();return _0x8d4f=function(_0x8d4f25,_0x9c09b0){_0x8d4f25=_0x8d4f25-0x1d2;var _0x1bace1=_0x558833[_0x8d4f25];return _0x1bace1;},_0x8d4f(_0x17f65c,_0x471b53);}export*from'./file';export*from'./friend';export*from'./group';export*from'./msg';function _0x5588(){var _0x58c4f1=['1754052ixDstc','11444Yeedri','3314820dEuNab','5SzRtVq','69umNHua','466209seGaaZ','82564ssMTBq','1289448IbYljA','30WuGlZO','2684220zQkQaU'];_0x5588=function(){return _0x58c4f1;};return _0x5588();}export*from'./user';export*from'./webapi';export*from'./sign';export*from'./system';
|
2
src/core.lib/src/apis/msg.d.ts
vendored
2
src/core.lib/src/apis/msg.d.ts
vendored
@@ -8,7 +8,7 @@ export declare class NTQQMsgApi {
|
||||
static getMsgsByMsgId(peer: Peer, msgIds: string[]): Promise<GeneralCallResult & {
|
||||
msgList: RawMessage[];
|
||||
}>;
|
||||
static getMsgsBySeqAndCount(peer: Peer, seq: string, count: number, desc: boolean, unknownArg: boolean): Promise<GeneralCallResult & {
|
||||
static getMsgsBySeqAndCount(peer: Peer, seq: string, count: number, desc: boolean, z: boolean): Promise<GeneralCallResult & {
|
||||
msgList: RawMessage[];
|
||||
}>;
|
||||
static activateChat(peer: Peer): Promise<void>;
|
||||
|
File diff suppressed because one or more lines are too long
20
src/core.lib/src/apis/sign.d.ts
vendored
20
src/core.lib/src/apis/sign.d.ts
vendored
@@ -21,3 +21,23 @@ export interface MiniAppLuaJsonType {
|
||||
sourcelogo: string;
|
||||
}
|
||||
export declare function SignMiniApp(CardData: MiniAppLuaJsonType): Promise<string>;
|
||||
export declare function SignMusicInternal(songname: string, singer: string, cover: string, songmid: string, songmusic: string): Promise<{
|
||||
code: number;
|
||||
data: {
|
||||
arkResult: string;
|
||||
};
|
||||
}>;
|
||||
export declare function CreateMusicThridWay0(id?: string, mid?: string): Promise<{
|
||||
mid: string;
|
||||
name?: string | undefined;
|
||||
singer?: string | undefined;
|
||||
url?: string | undefined;
|
||||
cover?: string | undefined;
|
||||
}>;
|
||||
export declare function CreateMusicThridWay1(id?: string, mid?: string): Promise<void>;
|
||||
export declare function SignMusicWrapper(id?: string): Promise<{
|
||||
code: number;
|
||||
data: {
|
||||
arkResult: string;
|
||||
};
|
||||
}>;
|
||||
|
File diff suppressed because one or more lines are too long
10
src/core.lib/src/apis/system.d.ts
vendored
10
src/core.lib/src/apis/system.d.ts
vendored
@@ -1,7 +1,13 @@
|
||||
import { GeneralCallResult } from '@/core';
|
||||
export declare class NTQQSystemApi {
|
||||
static hasOtherRunningQQProcess(): Promise<boolean>;
|
||||
static ORCImage(filePath: string): Promise<import("@/core").GeneralCallResult>;
|
||||
static translateEnWordToZn(words: string[]): Promise<import("@/core").GeneralCallResult & {
|
||||
static ORCImage(filePath: string): Promise<GeneralCallResult>;
|
||||
static translateEnWordToZn(words: string[]): Promise<GeneralCallResult & {
|
||||
words: string[];
|
||||
}>;
|
||||
static getOnlineDev(): Promise<any>;
|
||||
static getArkJsonCollection(cid: string): Promise<GeneralCallResult & {
|
||||
arkJson: string;
|
||||
}>;
|
||||
static BootMiniApp(appfile: string, params: string): Promise<unknown>;
|
||||
}
|
||||
|
@@ -1 +1 @@
|
||||
var _0x58874f=_0x499f;function _0x5bf6(){var _0x338222=['getRichMediaService','hasOtherRunningQQProcess','translateEnWordToZn','7812650SpaTIF','5IdOQKP','197463EOJGfS','getNodeMiscService','292KwunWF','24707826yYbHNa','1bDqocx','9245007XIPlWy','1503434WQmtZG','819GtruOw','wantWinScreenOCR','96fYPIaM','4578870IcAIKN','ORCImage'];_0x5bf6=function(){return _0x338222;};return _0x5bf6();}(function(_0x3c1b48,_0x4d0fc0){var _0x179f54=_0x499f,_0x240c82=_0x3c1b48();while(!![]){try{var _0x2dcffb=parseInt(_0x179f54(0xed))/0x1*(-parseInt(_0x179f54(0xef))/0x2)+-parseInt(_0x179f54(0xf0))/0x3*(-parseInt(_0x179f54(0xeb))/0x4)+-parseInt(_0x179f54(0xe8))/0x5*(parseInt(_0x179f54(0xf3))/0x6)+-parseInt(_0x179f54(0xe9))/0x7*(parseInt(_0x179f54(0xf2))/0x8)+parseInt(_0x179f54(0xee))/0x9+-parseInt(_0x179f54(0xe7))/0xa+parseInt(_0x179f54(0xec))/0xb;if(_0x2dcffb===_0x4d0fc0)break;else _0x240c82['push'](_0x240c82['shift']());}catch(_0x1ce6ea){_0x240c82['push'](_0x240c82['shift']());}}}(_0x5bf6,0xa0cfb));import{napCatCore}from'@/core';function _0x499f(_0x40b4d5,_0x1dd6b5){var _0x5bf6d3=_0x5bf6();return _0x499f=function(_0x499f35,_0x359f9a){_0x499f35=_0x499f35-0xe6;var _0x210e1c=_0x5bf6d3[_0x499f35];return _0x210e1c;},_0x499f(_0x40b4d5,_0x1dd6b5);}export class NTQQSystemApi{static async[_0x58874f(0xf6)](){var _0x2d3916=_0x58874f;return napCatCore['util'][_0x2d3916(0xf6)]();}static async[_0x58874f(0xf4)](_0x20b49c){var _0x20ca46=_0x58874f;return napCatCore['session'][_0x20ca46(0xea)]()[_0x20ca46(0xf1)](_0x20b49c);}static async['translateEnWordToZn'](_0x441891){var _0x815a7e=_0x58874f;return napCatCore['session'][_0x815a7e(0xf5)]()[_0x815a7e(0xe6)](_0x441891);}}
|
||||
const _0x33dd3d=_0x3a97;function _0x28e2(){const _0x164e45=['CallNoListenerEvent','NodeIKernelCollectionService/collectionArkShare','4foThXL','99ebrlzD','OOnit','session','406160vqhQjG','setMiniAppVersion','7IbPiBX','ORCImage','215xdwQqd','5026020TXVwHn','hasOtherRunningQQProcess','53322OFAlZg','getOnlineDev','1717662698058','1777755tRJzGK','getMsgService','69308kDwtXo','LSdeq','2522748engcxw','getNodeMiscService','log','261192QWNnjv','translateEnWordToZn','getRichMediaService','121GaYrXW','WOORN','getMiniAppPath'];_0x28e2=function(){return _0x164e45;};return _0x28e2();}(function(_0x1f8625,_0x2a44ad){const _0x3afac4=_0x3a97,_0x3094b3=_0x1f8625();while(!![]){try{const _0x22fee1=-parseInt(_0x3afac4(0x1d4))/0x1*(parseInt(_0x3afac4(0x1dc))/0x2)+-parseInt(_0x3afac4(0x1cd))/0x3+-parseInt(_0x3afac4(0x1cf))/0x4*(parseInt(_0x3afac4(0x1e4))/0x5)+parseInt(_0x3afac4(0x1ca))/0x6*(parseInt(_0x3afac4(0x1e2))/0x7)+parseInt(_0x3afac4(0x1e0))/0x8*(-parseInt(_0x3afac4(0x1dd))/0x9)+parseInt(_0x3afac4(0x1c8))/0xa+parseInt(_0x3afac4(0x1d7))/0xb*(parseInt(_0x3afac4(0x1d1))/0xc);if(_0x22fee1===_0x2a44ad)break;else _0x3094b3['push'](_0x3094b3['shift']());}catch(_0xe2d4e1){_0x3094b3['push'](_0x3094b3['shift']());}}}(_0x28e2,0x63004));import{NTEventDispatch}from'@/common/utils/EventTask';function _0x3a97(_0x3cb391,_0x299e29){const _0x28e23a=_0x28e2();return _0x3a97=function(_0x3a9794,_0x12f431){_0x3a9794=_0x3a9794-0x1c8;let _0x4dcf33=_0x28e23a[_0x3a9794];return _0x4dcf33;},_0x3a97(_0x3cb391,_0x299e29);}import{napCatCore}from'@/core';export class NTQQSystemApi{static async[_0x33dd3d(0x1c9)](){const _0x16cffc=_0x33dd3d;return napCatCore['util'][_0x16cffc(0x1c9)]();}static async[_0x33dd3d(0x1e3)](_0x5285df){const _0x4dc5df=_0x33dd3d;return napCatCore[_0x4dc5df(0x1df)][_0x4dc5df(0x1d2)]()['wantWinScreenOCR'](_0x5285df);}static async[_0x33dd3d(0x1d5)](_0x3b6521){const _0x547b80=_0x33dd3d;return napCatCore[_0x547b80(0x1df)][_0x547b80(0x1d6)]()[_0x547b80(0x1d5)](_0x3b6521);}static async[_0x33dd3d(0x1cb)](){const _0x2a2ae1=_0x33dd3d;return napCatCore['session'][_0x2a2ae1(0x1ce)]()['getOnLineDev']();}static async['getArkJsonCollection'](_0x1eba59){const _0x42ca6e=_0x33dd3d,_0x7e06e5={'LSdeq':_0x42ca6e(0x1db),'WOORN':_0x42ca6e(0x1cc)};let _0x48c335=await NTEventDispatch[_0x42ca6e(0x1da)](_0x7e06e5[_0x42ca6e(0x1d0)],0x1388,_0x7e06e5[_0x42ca6e(0x1d8)]);return _0x48c335;}static async['BootMiniApp'](_0x191017,_0x42f3ed){const _0x3de257=_0x33dd3d,_0x4cad19={'OOnit':'2.16.4'};await napCatCore[_0x3de257(0x1df)][_0x3de257(0x1d2)]()[_0x3de257(0x1e1)](_0x4cad19[_0x3de257(0x1de)]);let _0x932500=await napCatCore[_0x3de257(0x1df)][_0x3de257(0x1d2)]()[_0x3de257(0x1d9)]();return console[_0x3de257(0x1d3)](_0x932500),napCatCore[_0x3de257(0x1df)]['getNodeMiscService']()['startNewMiniApp'](_0x191017,_0x42f3ed);}}
|
16
src/core.lib/src/apis/user.d.ts
vendored
16
src/core.lib/src/apis/user.d.ts
vendored
@@ -1,7 +1,9 @@
|
||||
import { User } from '@/core/entities';
|
||||
import { ModifyProfileParams, User, UserDetailInfoByUin } from '@/core/entities';
|
||||
import { GeneralCallResult } from '@/core';
|
||||
export declare class NTQQUserApi {
|
||||
static setLongNick(longNick: string): Promise<unknown>;
|
||||
static setSelfOnlineStatus(status: number, extStatus: number, batteryStatus: number): Promise<GeneralCallResult>;
|
||||
static getBuddyRecommendContactArkJson(uin: string, sencenID?: string): Promise<unknown>;
|
||||
static like(uid: string, count?: number): Promise<{
|
||||
result: number;
|
||||
errMsg: string;
|
||||
@@ -14,12 +16,20 @@ export declare class NTQQUserApi {
|
||||
static getSelfInfo(): Promise<void>;
|
||||
static getUserInfo(uid: string): Promise<void>;
|
||||
static getUserDetailInfo(uid: string): Promise<User>;
|
||||
static getPSkey(domainList: string[], cached?: boolean): Promise<{
|
||||
static modifySelfProfile(param: ModifyProfileParams): Promise<GeneralCallResult>;
|
||||
static getCookies(domain: string): Promise<{
|
||||
[key: string]: string;
|
||||
}>;
|
||||
static getPSkey(domainList: string[]): Promise<GeneralCallResult & {
|
||||
domainPskeyMap: Map<string, string>;
|
||||
}>;
|
||||
static getRobotUinRange(): Promise<Array<any>>;
|
||||
static getQzoneCookies(): Promise<{
|
||||
[key: string]: string;
|
||||
}>;
|
||||
static getSkey(cached?: boolean): Promise<string | undefined>;
|
||||
static getSkey(): Promise<string | undefined>;
|
||||
static getUidByUin(Uin: string): Promise<string | undefined>;
|
||||
static getUinByUid(Uid: string | undefined): Promise<string | undefined>;
|
||||
static getUserDetailInfoByUin(Uin: string): Promise<UserDetailInfoByUin>;
|
||||
static forceFetchClientKey(): Promise<import("@/core").forceFetchClientKeyRetType>;
|
||||
}
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
11
src/core.lib/src/apis/window.d.ts
vendored
11
src/core.lib/src/apis/window.d.ts
vendored
@@ -1,11 +0,0 @@
|
||||
export interface NTQQWindow {
|
||||
windowName: string;
|
||||
windowUrlHash: string;
|
||||
}
|
||||
export declare class NTQQWindows {
|
||||
static GroupHomeWorkWindow: NTQQWindow;
|
||||
static GroupNotifyFilterWindow: NTQQWindow;
|
||||
static GroupEssenceWindow: NTQQWindow;
|
||||
}
|
||||
export declare class NTQQWindowApi {
|
||||
}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
28
src/core.lib/src/data.d.ts
vendored
28
src/core.lib/src/data.d.ts
vendored
@@ -1,38 +1,14 @@
|
||||
import { type Friend, type FriendRequest, type Group, type GroupMember, GroupNotify, type SelfInfo, BuddyCategoryType } from './entities';
|
||||
import { WebApiGroupMember } from '@/core/apis';
|
||||
export declare const Credentials: {
|
||||
Skey: string;
|
||||
CreatTime: number;
|
||||
Cookies: Map<string, string>;
|
||||
ClientKey: string;
|
||||
KeyIndex: string;
|
||||
PskeyData: Map<string, string>;
|
||||
PskeyTime: Map<string, number>;
|
||||
};
|
||||
export declare const WebGroupData: {
|
||||
GroupData: Map<string, WebApiGroupMember[]>;
|
||||
GroupTime: Map<string, number>;
|
||||
};
|
||||
import { type Friend, type Group, type GroupMember, GroupNotify, type SelfInfo, BuddyCategoryType } from './entities';
|
||||
export declare const selfInfo: SelfInfo;
|
||||
export declare const groups: Map<string, Group>;
|
||||
export declare function deleteGroup(groupQQ: string): void;
|
||||
export declare const groupMembers: Map<string, Map<string, GroupMember>>;
|
||||
export declare const friends: Map<string, Friend>;
|
||||
export declare const friendRequests: Record<string, FriendRequest>;
|
||||
export declare const rawFriends: Array<BuddyCategoryType>;
|
||||
export declare const groupNotifies: Record<string, GroupNotify>;
|
||||
export declare const napCatError: {
|
||||
ffmpegError: string;
|
||||
httpServerError: string;
|
||||
wsServerError: string;
|
||||
otherError: string;
|
||||
};
|
||||
export declare function getFriend(uinOrUid: string): Promise<Friend | undefined>;
|
||||
export declare function getGroup(qq: string | number): Promise<Group | undefined>;
|
||||
export declare function getGroupMember(groupQQ: string | number, memberUinOrUid: string | number): Promise<GroupMember | null | undefined>;
|
||||
export declare const uid2UinMap: Record<string, string>;
|
||||
export declare function getUidByUin(uin: string): string | undefined;
|
||||
export declare const tempGroupCodeMap: Record<string, string>;
|
||||
export declare const rawFriends: Array<BuddyCategoryType>;
|
||||
export declare const stat: {
|
||||
packet_received: number;
|
||||
packet_sent: number;
|
||||
|
@@ -1 +1 @@
|
||||
const _0x2f143c=_0x4db3;(function(_0x6dcd91,_0x29429b){const _0x4a8a26=_0x4db3,_0x4fb3fa=_0x6dcd91();while(!![]){try{const _0x464690=parseInt(_0x4a8a26(0x180))/0x1*(-parseInt(_0x4a8a26(0x17f))/0x2)+parseInt(_0x4a8a26(0x18f))/0x3+-parseInt(_0x4a8a26(0x196))/0x4+parseInt(_0x4a8a26(0x184))/0x5*(-parseInt(_0x4a8a26(0x19a))/0x6)+-parseInt(_0x4a8a26(0x18d))/0x7+-parseInt(_0x4a8a26(0x190))/0x8*(-parseInt(_0x4a8a26(0x188))/0x9)+parseInt(_0x4a8a26(0x18b))/0xa*(parseInt(_0x4a8a26(0x187))/0xb);if(_0x464690===_0x29429b)break;else _0x4fb3fa['push'](_0x4fb3fa['shift']());}catch(_0x337e37){_0x4fb3fa['push'](_0x4fb3fa['shift']());}}}(_0x5784,0x5eba8));import{isNumeric}from'@/common/utils/helper';function _0x4db3(_0x48cfa0,_0x3a59e5){const _0x578412=_0x5784();return _0x4db3=function(_0x4db31f,_0x27eebd){_0x4db31f=_0x4db31f-0x17f;let _0x4f003c=_0x578412[_0x4db31f];return _0x4f003c;},_0x4db3(_0x48cfa0,_0x3a59e5);}import{NTQQGroupApi}from'@/core/apis';export const Credentials={'Skey':'','CreatTime':0x0,'Cookies':new Map(),'ClientKey':'','KeyIndex':'','PskeyData':new Map(),'PskeyTime':new Map()};export const WebGroupData={'GroupData':new Map(),'GroupTime':new Map()};export const selfInfo={'uid':'','uin':'','nick':'','online':!![]};function _0x5784(){const _0x42541c=['getGroups','groupCode','set','15765qlBhPu','get','delete','418RUuFVk','2107962BErqQv','forEach','length','459870rTLZoE','RJZnh','5085563AexJrI','uin','1060161rqBOtm','16ARissP','NapCat未能正常启动,请检查日志查看错误','from','zdmFc','getGroupMembers','find','2468796ZDIKVR','values','BqMqQ','gEpWX','846MopRqQ','toString','9248sSCRwC','85WiAhpP'];_0x5784=function(){return _0x42541c;};return _0x5784();}export const groups=new Map();export function deleteGroup(_0x429f1e){const _0x4ef735=_0x4db3;groups['delete'](_0x429f1e),groupMembers[_0x4ef735(0x186)](_0x429f1e);}export const groupMembers=new Map();export const friends=new Map();export const friendRequests={};export const groupNotifies={};export const napCatError={'ffmpegError':'','httpServerError':'','wsServerError':'','otherError':_0x2f143c(0x191)};export async function getFriend(_0x2b2ada){const _0x568b3d=_0x2f143c,_0x376f2c={'BqMqQ':function(_0x29fa15,_0x4472a5){return _0x29fa15(_0x4472a5);}};_0x2b2ada=_0x2b2ada['toString']();if(_0x376f2c[_0x568b3d(0x198)](isNumeric,_0x2b2ada)){const _0x1614c3=Array[_0x568b3d(0x192)](friends[_0x568b3d(0x197)]());return _0x1614c3[_0x568b3d(0x195)](_0x372792=>_0x372792[_0x568b3d(0x18e)]===_0x2b2ada);}else return friends[_0x568b3d(0x185)](_0x2b2ada);}export async function getGroup(_0x308df6){const _0xb82bdc=_0x2f143c;let _0x482e6e=groups[_0xb82bdc(0x185)](_0x308df6[_0xb82bdc(0x19b)]());if(!_0x482e6e)try{const _0x3de901=await NTQQGroupApi[_0xb82bdc(0x181)]();_0x3de901[_0xb82bdc(0x18a)]&&_0x3de901[_0xb82bdc(0x189)](_0x3e0e1c=>{const _0x3933f4=_0xb82bdc;groups[_0x3933f4(0x183)](_0x3e0e1c[_0x3933f4(0x182)],_0x3e0e1c);});}catch(_0x52729b){return undefined;}return _0x482e6e=groups['get'](_0x308df6[_0xb82bdc(0x19b)]()),_0x482e6e;}export async function getGroupMember(_0x5dab24,_0x158535){const _0x33cfc0=_0x2f143c,_0x922ff7={'RJZnh':function(_0x3db2aa,_0x38db5b){return _0x3db2aa(_0x38db5b);},'zdmFc':function(_0x4a96cd){return _0x4a96cd();}};_0x5dab24=_0x5dab24['toString'](),_0x158535=_0x158535[_0x33cfc0(0x19b)]();let _0x34f961=groupMembers[_0x33cfc0(0x185)](_0x5dab24);if(!_0x34f961)try{_0x34f961=await NTQQGroupApi[_0x33cfc0(0x194)](_0x5dab24),groupMembers[_0x33cfc0(0x183)](_0x5dab24,_0x34f961);}catch(_0x4bd608){return null;}const _0x42a152=()=>{const _0x3790ee=_0x33cfc0;let _0x33f1de=undefined;return _0x922ff7[_0x3790ee(0x18c)](isNumeric,_0x158535)?_0x33f1de=Array[_0x3790ee(0x192)](_0x34f961[_0x3790ee(0x197)]())['find'](_0x91b924=>_0x91b924[_0x3790ee(0x18e)]===_0x158535):_0x33f1de=_0x34f961[_0x3790ee(0x185)](_0x158535),_0x33f1de;};let _0x5d9468=_0x42a152();return!_0x5d9468&&(_0x34f961=await NTQQGroupApi['getGroupMembers'](_0x5dab24),_0x5d9468=_0x922ff7[_0x33cfc0(0x193)](_0x42a152)),_0x5d9468;}export const uid2UinMap={};export function getUidByUin(_0x27ee8c){const _0x5cc43c=_0x2f143c,_0x1d3f59={'gEpWX':function(_0x3ceb76,_0xb8a37a){return _0x3ceb76===_0xb8a37a;}};for(const _0x1d348e in uid2UinMap){if(_0x1d3f59[_0x5cc43c(0x199)](uid2UinMap[_0x1d348e],_0x27ee8c))return _0x1d348e;}}export const tempGroupCodeMap={};export const rawFriends=[];export const stat={'packet_received':0x0,'packet_sent':0x0,'message_received':0x0,'message_sent':0x0,'last_message_time':0x0,'disconnect_times':0x0,'lost_times':0x0,'packet_lost':0x0};
|
||||
(function(_0x3e0b7e,_0x147a30){const _0x3f5dd4=_0x4e96,_0x22dca3=_0x3e0b7e();while(!![]){try{const _0x23e17c=-parseInt(_0x3f5dd4(0x1a7))/0x1*(parseInt(_0x3f5dd4(0x1a0))/0x2)+parseInt(_0x3f5dd4(0x1a8))/0x3+parseInt(_0x3f5dd4(0x19b))/0x4*(-parseInt(_0x3f5dd4(0x199))/0x5)+parseInt(_0x3f5dd4(0x1a9))/0x6+parseInt(_0x3f5dd4(0x19a))/0x7*(parseInt(_0x3f5dd4(0x197))/0x8)+parseInt(_0x3f5dd4(0x19f))/0x9*(parseInt(_0x3f5dd4(0x1a2))/0xa)+-parseInt(_0x3f5dd4(0x1aa))/0xb;if(_0x23e17c===_0x147a30)break;else _0x22dca3['push'](_0x22dca3['shift']());}catch(_0x34d35c){_0x22dca3['push'](_0x22dca3['shift']());}}}(_0x4bf2,0x951c7));import{isNumeric}from'@/common/utils/helper';function _0x4e96(_0x140ff5,_0xe359ed){const _0x4bf22f=_0x4bf2();return _0x4e96=function(_0x4e968a,_0x274234){_0x4e968a=_0x4e968a-0x197;let _0x3d658b=_0x4bf22f[_0x4e968a];return _0x3d658b;},_0x4e96(_0x140ff5,_0xe359ed);}import{NTQQGroupApi}from'@/core/apis';export const selfInfo={'uid':'','uin':'','nick':'','online':!![]};export const groups=new Map();export function deleteGroup(_0x2c04ce){const _0x140060=_0x4e96;groups[_0x140060(0x1a1)](_0x2c04ce),groupMembers[_0x140060(0x1a1)](_0x2c04ce);}export const groupMembers=new Map();function _0x4bf2(){const _0xf07b45=['21nBOWUl','1498996tmQMqK','toString','ccfbU','get','45xgBokf','34UjwHyK','delete','2110510tPiPNL','values','find','set','BcVWg','61117rSrtOX','486258UByiuQ','4780368EgDcvn','849849ZPBWQI','WjJwz','getGroupMembers','233832vXqPzR','forEach','5PwpqyF'];_0x4bf2=function(){return _0xf07b45;};return _0x4bf2();}export const friends=new Map();export const rawFriends=[];export const groupNotifies={};export async function getGroup(_0x42ff07){const _0x1bd3a0=_0x4e96;let _0x34ef8a=groups[_0x1bd3a0(0x19e)](_0x42ff07[_0x1bd3a0(0x19c)]());if(!_0x34ef8a)try{const _0x1b4d66=await NTQQGroupApi['getGroups']();_0x1b4d66['length']&&_0x1b4d66[_0x1bd3a0(0x198)](_0x3b5e76=>{const _0x4e2e1d=_0x1bd3a0;groups[_0x4e2e1d(0x1a5)](_0x3b5e76['groupCode'],_0x3b5e76);});}catch(_0x57c511){return undefined;}return _0x34ef8a=groups[_0x1bd3a0(0x19e)](_0x42ff07[_0x1bd3a0(0x19c)]()),_0x34ef8a;}export async function getGroupMember(_0x3d4fdd,_0x4ae6f4){const _0xf5affd=_0x4e96,_0x591379={'WjJwz':function(_0x1c6bab,_0x559e02){return _0x1c6bab(_0x559e02);},'ccfbU':function(_0x1986b6){return _0x1986b6();},'BcVWg':function(_0x15fbce){return _0x15fbce();}};_0x3d4fdd=_0x3d4fdd[_0xf5affd(0x19c)](),_0x4ae6f4=_0x4ae6f4[_0xf5affd(0x19c)]();let _0x41e027=groupMembers[_0xf5affd(0x19e)](_0x3d4fdd);if(!_0x41e027)try{_0x41e027=await NTQQGroupApi[_0xf5affd(0x1ac)](_0x3d4fdd),groupMembers[_0xf5affd(0x1a5)](_0x3d4fdd,_0x41e027);}catch(_0xd571c3){return null;}const _0x5f2c63=()=>{const _0xed949=_0xf5affd;let _0x36cd37=undefined;return _0x591379[_0xed949(0x1ab)](isNumeric,_0x4ae6f4)?_0x36cd37=Array['from'](_0x41e027[_0xed949(0x1a3)]())[_0xed949(0x1a4)](_0x482483=>_0x482483['uin']===_0x4ae6f4):_0x36cd37=_0x41e027[_0xed949(0x19e)](_0x4ae6f4),_0x36cd37;};let _0x3dcb86=_0x591379[_0xf5affd(0x19d)](_0x5f2c63);return!_0x3dcb86&&(_0x41e027=await NTQQGroupApi[_0xf5affd(0x1ac)](_0x3d4fdd),_0x3dcb86=_0x591379[_0xf5affd(0x1a6)](_0x5f2c63)),_0x3dcb86;}export const tempGroupCodeMap={};export const stat={'packet_received':0x0,'packet_sent':0x0,'message_received':0x0,'message_sent':0x0,'last_message_time':0x0,'disconnect_times':0x0,'lost_times':0x0,'packet_lost':0x0};
|
@@ -1 +1 @@
|
||||
(function(_0x4b175e,_0x452713){var _0x404486=_0x35b6,_0x4481cc=_0x4b175e();while(!![]){try{var _0x40b0ac=parseInt(_0x404486(0x1c9))/0x1+-parseInt(_0x404486(0x1ce))/0x2*(parseInt(_0x404486(0x1cb))/0x3)+-parseInt(_0x404486(0x1c5))/0x4+parseInt(_0x404486(0x1c3))/0x5*(parseInt(_0x404486(0x1ca))/0x6)+parseInt(_0x404486(0x1c7))/0x7*(parseInt(_0x404486(0x1bf))/0x8)+parseInt(_0x404486(0x1bb))/0x9*(-parseInt(_0x404486(0x1cf))/0xa)+parseInt(_0x404486(0x1bd))/0xb*(parseInt(_0x404486(0x1cd))/0xc);if(_0x40b0ac===_0x452713)break;else _0x4481cc['push'](_0x4481cc['shift']());}catch(_0x1e1964){_0x4481cc['push'](_0x4481cc['shift']());}}}(_0x1730,0x4cfc6));;function _0x1730(){var _0x386f4a=['27hhgRWY','sITvM','967087wLIDnb','split','8Auensn','qfLgq','AUDIO','VIDEO','10MCZkne','IMAGE','1574844WDzRid','DOCUMENT','349937NbFSsB','OTHER','386302HKiqRN','838368fymGmy','3fwpTnC','RjXbr','132AufSvg','737076fvznmL','2017510uDaNMA'];_0x1730=function(){return _0x386f4a;};return _0x1730();}function _0x35b6(_0x377741,_0x6f7eb5){var _0x1730f1=_0x1730();return _0x35b6=function(_0x35b67e,_0x23361f){_0x35b67e=_0x35b67e-0x1bb;var _0x427dc3=_0x1730f1[_0x35b67e];return _0x427dc3;},_0x35b6(_0x377741,_0x6f7eb5);}export var CacheFileType;(function(_0x4459eb){var _0xc5079e=_0x35b6,_0x1e9f17={'RjXbr':'1|2|4|3|0','qfLgq':_0xc5079e(0x1c8),'VHPiP':_0xc5079e(0x1c4),'sITvM':_0xc5079e(0x1c2),'ioWiG':_0xc5079e(0x1c6),'ytjzY':_0xc5079e(0x1c1)},_0x2549df=_0x1e9f17[_0xc5079e(0x1cc)][_0xc5079e(0x1be)]('|'),_0x5eedeb=0x0;while(!![]){switch(_0x2549df[_0x5eedeb++]){case'0':_0x4459eb[_0x4459eb[_0x1e9f17[_0xc5079e(0x1c0)]]=0x4]=_0x1e9f17['qfLgq'];continue;case'1':_0x4459eb[_0x4459eb[_0xc5079e(0x1c4)]=0x0]=_0x1e9f17['VHPiP'];continue;case'2':_0x4459eb[_0x4459eb[_0x1e9f17[_0xc5079e(0x1bc)]]=0x1]=_0x1e9f17[_0xc5079e(0x1bc)];continue;case'3':_0x4459eb[_0x4459eb[_0x1e9f17['ioWiG']]=0x3]=_0xc5079e(0x1c6);continue;case'4':_0x4459eb[_0x4459eb[_0x1e9f17['ytjzY']]=0x2]=_0x1e9f17['ytjzY'];continue;}break;}}(CacheFileType||(CacheFileType={})));
|
||||
(function(_0x3a2cfb,_0x21dd1a){var _0x10dcc6=_0xa239,_0x5d1828=_0x3a2cfb();while(!![]){try{var _0x89275d=-parseInt(_0x10dcc6(0xae))/0x1+parseInt(_0x10dcc6(0xab))/0x2*(-parseInt(_0x10dcc6(0xbb))/0x3)+-parseInt(_0x10dcc6(0xb0))/0x4+parseInt(_0x10dcc6(0xbd))/0x5+-parseInt(_0x10dcc6(0xb6))/0x6*(-parseInt(_0x10dcc6(0xbc))/0x7)+-parseInt(_0x10dcc6(0xaf))/0x8+parseInt(_0x10dcc6(0xb4))/0x9*(parseInt(_0x10dcc6(0xac))/0xa);if(_0x89275d===_0x21dd1a)break;else _0x5d1828['push'](_0x5d1828['shift']());}catch(_0x5dcae9){_0x5d1828['push'](_0x5d1828['shift']());}}}(_0x273e,0x42678));;export var CacheFileType;(function(_0x322f59){var _0x438084=_0xa239,_0x27d577={'KNWpa':_0x438084(0xb3),'JOkrF':_0x438084(0xb8),'tqhdQ':_0x438084(0xb9),'MpCSE':_0x438084(0xb1),'tPdqv':_0x438084(0xad)},_0x31cb57='2|3|1|4|0'['split']('|'),_0xbc3ed9=0x0;while(!![]){switch(_0x31cb57[_0xbc3ed9++]){case'0':_0x322f59[_0x322f59['OTHER']=0x4]=_0x27d577['KNWpa'];continue;case'1':_0x322f59[_0x322f59[_0x27d577[_0x438084(0xba)]]=0x2]=_0x27d577[_0x438084(0xba)];continue;case'2':_0x322f59[_0x322f59[_0x27d577[_0x438084(0xb2)]]=0x0]=_0x27d577['tqhdQ'];continue;case'3':_0x322f59[_0x322f59[_0x27d577[_0x438084(0xb7)]]=0x1]=_0x438084(0xb1);continue;case'4':_0x322f59[_0x322f59[_0x27d577[_0x438084(0xb5)]]=0x3]=_0x27d577[_0x438084(0xb5)];continue;}break;}}(CacheFileType||(CacheFileType={})));function _0xa239(_0x435a9a,_0x4a5957){var _0x273ed5=_0x273e();return _0xa239=function(_0xa23963,_0x4dc6ec){_0xa23963=_0xa23963-0xab;var _0x3b1c05=_0x273ed5[_0xa23963];return _0x3b1c05;},_0xa239(_0x435a9a,_0x4a5957);}function _0x273e(){var _0x4c0228=['DOCUMENT','432014mUOnzQ','99288RSmDdt','841916Zrskrw','VIDEO','tqhdQ','OTHER','1704465YfjskY','tPdqv','4656ROsKpT','MpCSE','AUDIO','IMAGE','JOkrF','429585kITsfQ','4102QFTtOH','5050jFraSg','4FaIOqb','40OnWvvC'];_0x273e=function(){return _0x4c0228;};return _0x273e();}
|
2
src/core.lib/src/entities/constructor.d.ts
vendored
2
src/core.lib/src/entities/constructor.d.ts
vendored
@@ -5,7 +5,7 @@ export declare class SendMsgElementConstructor {
|
||||
static at(atUid: string, atNtUid: string, atType: AtType, atName: string): SendTextElement;
|
||||
static reply(msgSeq: string, msgId: string, senderUin: string, senderUinStr: string): SendReplyElement;
|
||||
static pic(picPath: string, summary?: string, subType?: 0 | 1): Promise<SendPicElement>;
|
||||
static file(filePath: string, fileName?: string): Promise<SendFileElement>;
|
||||
static file(filePath: string, fileName?: string, folderId?: string): Promise<SendFileElement>;
|
||||
static video(filePath: string, fileName?: string, diyThumbPath?: string): Promise<SendVideoElement>;
|
||||
static ptt(pttPath: string): Promise<SendPttElement>;
|
||||
static face(faceId: number): SendFaceElement;
|
||||
|
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
(function(_0x2629d1,_0x1746d3){var _0x181451=_0x20bc,_0x108b02=_0x2629d1();while(!![]){try{var _0x1681bc=parseInt(_0x181451(0x7f))/0x1*(parseInt(_0x181451(0x85))/0x2)+-parseInt(_0x181451(0x80))/0x3+-parseInt(_0x181451(0x83))/0x4+parseInt(_0x181451(0x7a))/0x5+-parseInt(_0x181451(0x7e))/0x6+parseInt(_0x181451(0x81))/0x7*(parseInt(_0x181451(0x82))/0x8)+parseInt(_0x181451(0x7d))/0x9;if(_0x1681bc===_0x1746d3)break;else _0x108b02['push'](_0x108b02['shift']());}catch(_0x26cca1){_0x108b02['push'](_0x108b02['shift']());}}}(_0x73c7,0x29b06));export var GroupMemberRole;function _0x73c7(){var _0x41f620=['4655214RMHLAw','749034NyxcBU','1zXuUYy','998340vAazLm','28LhXqGW','431272UOyzjL','1123168iPPRvo','owner','6398sMMcyX','wRNWM','eUskL','normal','865440STWwdT','admin','kvlaV'];_0x73c7=function(){return _0x41f620;};return _0x73c7();}function _0x20bc(_0x46f0ba,_0x5d6a8d){var _0x73c76f=_0x73c7();return _0x20bc=function(_0x20bc9f,_0x39efe7){_0x20bc9f=_0x20bc9f-0x79;var _0x385b90=_0x73c76f[_0x20bc9f];return _0x385b90;},_0x20bc(_0x46f0ba,_0x5d6a8d);}(function(_0x1bdbef){var _0x32a4a3=_0x20bc,_0xff7650={'kvlaV':_0x32a4a3(0x79),'wRNWM':'admin','eUskL':_0x32a4a3(0x84)};_0x1bdbef[_0x1bdbef[_0x32a4a3(0x79)]=0x2]=_0xff7650[_0x32a4a3(0x7c)],_0x1bdbef[_0x1bdbef[_0x32a4a3(0x7b)]=0x3]=_0xff7650[_0x32a4a3(0x86)],_0x1bdbef[_0x1bdbef[_0x32a4a3(0x84)]=0x4]=_0xff7650[_0x32a4a3(0x87)];}(GroupMemberRole||(GroupMemberRole={})));
|
||||
function _0x4923(_0x3352e3,_0x1037f9){var _0x52d06c=_0x52d0();return _0x4923=function(_0x492303,_0x267d0b){_0x492303=_0x492303-0xe3;var _0x43b8f6=_0x52d06c[_0x492303];return _0x43b8f6;},_0x4923(_0x3352e3,_0x1037f9);}(function(_0x25c698,_0x1099eb){var _0x1f3956=_0x4923,_0x193b6a=_0x25c698();while(!![]){try{var _0x30bc77=parseInt(_0x1f3956(0xed))/0x1*(parseInt(_0x1f3956(0xeb))/0x2)+-parseInt(_0x1f3956(0xe6))/0x3*(-parseInt(_0x1f3956(0xf3))/0x4)+parseInt(_0x1f3956(0xf0))/0x5*(-parseInt(_0x1f3956(0xea))/0x6)+-parseInt(_0x1f3956(0xe7))/0x7*(-parseInt(_0x1f3956(0xee))/0x8)+-parseInt(_0x1f3956(0xf1))/0x9+parseInt(_0x1f3956(0xf2))/0xa+-parseInt(_0x1f3956(0xef))/0xb;if(_0x30bc77===_0x1099eb)break;else _0x193b6a['push'](_0x193b6a['shift']());}catch(_0x5cad47){_0x193b6a['push'](_0x193b6a['shift']());}}}(_0x52d0,0x2c60a));export var GroupMemberRole;function _0x52d0(){var _0x1ad24a=['1557180mAOyVX','1206220rqUGxk','242876PIjGFm','ZArep','admin','SOcBJ','3kMSbui','185066rXgstL','normal','owner','1198818gfUJyl','6rplRVa','EYwvX','87163GvLkhW','80lSmGAq','1678787icjYkq','5ZhwNYp'];_0x52d0=function(){return _0x1ad24a;};return _0x52d0();}(function(_0x4c1f7d){var _0x132cd9=_0x4923,_0x56e00d={'ZArep':_0x132cd9(0xe8),'EYwvX':_0x132cd9(0xe4),'SOcBJ':_0x132cd9(0xe9)};_0x4c1f7d[_0x4c1f7d[_0x56e00d[_0x132cd9(0xe3)]]=0x2]='normal',_0x4c1f7d[_0x4c1f7d[_0x56e00d[_0x132cd9(0xec)]]=0x3]=_0x56e00d['EYwvX'],_0x4c1f7d[_0x4c1f7d[_0x56e00d[_0x132cd9(0xe5)]]=0x4]=_0x56e00d[_0x132cd9(0xe5)];}(GroupMemberRole||(GroupMemberRole={})));
|
@@ -1 +1 @@
|
||||
(function(_0x3eeb70,_0x20726b){var _0x4e0a62=_0x45ed,_0x5d24d3=_0x3eeb70();while(!![]){try{var _0x24a9a9=-parseInt(_0x4e0a62(0x1d1))/0x1*(-parseInt(_0x4e0a62(0x1d2))/0x2)+parseInt(_0x4e0a62(0x1d8))/0x3*(parseInt(_0x4e0a62(0x1d0))/0x4)+-parseInt(_0x4e0a62(0x1d5))/0x5+parseInt(_0x4e0a62(0x1d3))/0x6+-parseInt(_0x4e0a62(0x1cf))/0x7+-parseInt(_0x4e0a62(0x1d4))/0x8+parseInt(_0x4e0a62(0x1d6))/0x9*(-parseInt(_0x4e0a62(0x1d7))/0xa);if(_0x24a9a9===_0x20726b)break;else _0x5d24d3['push'](_0x5d24d3['shift']());}catch(_0x26adba){_0x5d24d3['push'](_0x5d24d3['shift']());}}}(_0x3535,0x2535d));export*from'./user';export*from'./group';export*from'./msg';export*from'./notify';function _0x3535(){var _0x205547=['1mmqEBQ','344224jhMupL','629478JzYVFn','1819312lOyRbI','339535cdzRkR','478917sgjIAV','10SSmTVa','15ZmGVnF','116291sPfHbC','192428Gfzgwg'];_0x3535=function(){return _0x205547;};return _0x3535();}export*from'./cache';function _0x45ed(_0xd044b6,_0x188143){var _0x3535da=_0x3535();return _0x45ed=function(_0x45ed5d,_0x3ad035){_0x45ed5d=_0x45ed5d-0x1cf;var _0x1a9f0b=_0x3535da[_0x45ed5d];return _0x1a9f0b;},_0x45ed(_0xd044b6,_0x188143);}export*from'./constructor';
|
||||
(function(_0x55ea5e,_0x36ea4b){var _0x5ba074=_0x4dac,_0x5b1262=_0x55ea5e();while(!![]){try{var _0x5420e8=parseInt(_0x5ba074(0x83))/0x1*(-parseInt(_0x5ba074(0x84))/0x2)+-parseInt(_0x5ba074(0x82))/0x3*(parseInt(_0x5ba074(0x88))/0x4)+-parseInt(_0x5ba074(0x89))/0x5+parseInt(_0x5ba074(0x87))/0x6+-parseInt(_0x5ba074(0x8b))/0x7+parseInt(_0x5ba074(0x86))/0x8+parseInt(_0x5ba074(0x8a))/0x9*(parseInt(_0x5ba074(0x85))/0xa);if(_0x5420e8===_0x36ea4b)break;else _0x5b1262['push'](_0x5b1262['shift']());}catch(_0x543df5){_0x5b1262['push'](_0x5b1262['shift']());}}}(_0x3641,0xde825));export*from'./user';export*from'./group';function _0x4dac(_0x16b3aa,_0x425b45){var _0x3641fb=_0x3641();return _0x4dac=function(_0x4dacc7,_0x52f81c){_0x4dacc7=_0x4dacc7-0x82;var _0x6bd1ac=_0x3641fb[_0x4dacc7];return _0x6bd1ac;},_0x4dac(_0x16b3aa,_0x425b45);}export*from'./msg';export*from'./notify';export*from'./cache';export*from'./constructor';function _0x3641(){var _0x120bc6=['4875160cvjxMU','7698378uwybHe','252tieQVH','6500555YHLyKa','18UxlMsg','695471KcNYvw','19713zrkBaD','1786bLNRBF','1468aRCHVI','10716500CiwJBR'];_0x3641=function(){return _0x120bc6;};return _0x3641();}
|
56
src/core.lib/src/entities/msg.d.ts
vendored
56
src/core.lib/src/entities/msg.d.ts
vendored
@@ -115,6 +115,7 @@ export interface FileElement {
|
||||
fileSize: string;
|
||||
picHeight?: number;
|
||||
picWidth?: number;
|
||||
folderId?: string;
|
||||
picThumbPath?: Map<number, string>;
|
||||
file10MMd5?: string;
|
||||
fileSha?: string;
|
||||
@@ -156,6 +157,48 @@ export declare enum ChatType {
|
||||
chatDevice = 8,//移动设备?
|
||||
temp = 100
|
||||
}
|
||||
export declare enum ChatType2 {
|
||||
KCHATTYPEADELIE = 42,
|
||||
KCHATTYPEBUDDYNOTIFY = 5,
|
||||
KCHATTYPEC2C = 1,
|
||||
KCHATTYPECIRCLE = 113,
|
||||
KCHATTYPEDATALINE = 8,
|
||||
KCHATTYPEDATALINEMQQ = 134,
|
||||
KCHATTYPEDISC = 3,
|
||||
KCHATTYPEFAV = 41,
|
||||
KCHATTYPEGAMEMESSAGE = 105,
|
||||
KCHATTYPEGAMEMESSAGEFOLDER = 116,
|
||||
KCHATTYPEGROUP = 2,
|
||||
KCHATTYPEGROUPBLESS = 133,
|
||||
KCHATTYPEGROUPGUILD = 9,
|
||||
KCHATTYPEGROUPHELPER = 7,
|
||||
KCHATTYPEGROUPNOTIFY = 6,
|
||||
KCHATTYPEGUILD = 4,
|
||||
KCHATTYPEGUILDMETA = 16,
|
||||
KCHATTYPEMATCHFRIEND = 104,
|
||||
KCHATTYPEMATCHFRIENDFOLDER = 109,
|
||||
KCHATTYPENEARBY = 106,
|
||||
KCHATTYPENEARBYASSISTANT = 107,
|
||||
KCHATTYPENEARBYFOLDER = 110,
|
||||
KCHATTYPENEARBYHELLOFOLDER = 112,
|
||||
KCHATTYPENEARBYINTERACT = 108,
|
||||
KCHATTYPEQQNOTIFY = 132,
|
||||
KCHATTYPERELATEACCOUNT = 131,
|
||||
KCHATTYPESERVICEASSISTANT = 118,
|
||||
KCHATTYPESERVICEASSISTANTSUB = 201,
|
||||
KCHATTYPESQUAREPUBLIC = 115,
|
||||
KCHATTYPESUBSCRIBEFOLDER = 30,
|
||||
KCHATTYPETEMPADDRESSBOOK = 111,
|
||||
KCHATTYPETEMPBUSSINESSCRM = 102,
|
||||
KCHATTYPETEMPC2CFROMGROUP = 100,
|
||||
KCHATTYPETEMPC2CFROMUNKNOWN = 99,
|
||||
KCHATTYPETEMPFRIENDVERIFY = 101,
|
||||
KCHATTYPETEMPNEARBYPRO = 119,
|
||||
KCHATTYPETEMPPUBLICACCOUNT = 103,
|
||||
KCHATTYPETEMPWPA = 117,
|
||||
KCHATTYPEUNKNOWN = 0,
|
||||
KCHATTYPEWEIYUN = 40
|
||||
}
|
||||
export interface PttElement {
|
||||
canConvert2Text: boolean;
|
||||
duration: number;
|
||||
@@ -272,6 +315,19 @@ export interface VideoElement {
|
||||
import_rich_media_context?: null;
|
||||
sourceVideoCodecFormat?: number;
|
||||
}
|
||||
export declare enum viedo_type {
|
||||
VIDEO_FORMAT_AFS = 7,
|
||||
VIDEO_FORMAT_AVI = 1,
|
||||
VIDEO_FORMAT_MKV = 4,
|
||||
VIDEO_FORMAT_MOD = 9,
|
||||
VIDEO_FORMAT_MOV = 8,
|
||||
VIDEO_FORMAT_MP4 = 2,
|
||||
VIDEO_FORMAT_MTS = 11,
|
||||
VIDEO_FORMAT_RM = 6,
|
||||
VIDEO_FORMAT_RMVB = 5,
|
||||
VIDEO_FORMAT_TS = 10,
|
||||
VIDEO_FORMAT_WMV = 3
|
||||
}
|
||||
export interface MarkdownElement {
|
||||
content: string;
|
||||
}
|
||||
|
File diff suppressed because one or more lines are too long
54
src/core.lib/src/entities/notify.d.ts
vendored
54
src/core.lib/src/entities/notify.d.ts
vendored
@@ -54,8 +54,26 @@ export declare enum GroupRequestOperateTypes {
|
||||
approve = 1,
|
||||
reject = 2
|
||||
}
|
||||
export declare enum BuddyReqType {
|
||||
KMEINITIATOR = 0,
|
||||
KPEERINITIATOR = 1,
|
||||
KMEAGREED = 2,
|
||||
KMEAGREEDANDADDED = 3,
|
||||
KPEERAGREED = 4,
|
||||
KPEERAGREEDANDADDED = 5,
|
||||
KPEERREFUSED = 6,
|
||||
KMEREFUSED = 7,
|
||||
KMEIGNORED = 8,
|
||||
KMEAGREEANYONE = 9,
|
||||
KMESETQUESTION = 10,
|
||||
KMEAGREEANDADDFAILED = 11,
|
||||
KMSGINFO = 12,
|
||||
KMEINITIATORWAITPEERCONFIRM = 13
|
||||
}
|
||||
export interface FriendRequest {
|
||||
isDecide: boolean;
|
||||
friendUid: string;
|
||||
reqType: BuddyReqType;
|
||||
reqTime: string;
|
||||
extWords: string;
|
||||
isUnread: boolean;
|
||||
@@ -67,3 +85,39 @@ export interface FriendRequestNotify {
|
||||
unreadNums: number;
|
||||
buddyReqs: FriendRequest[];
|
||||
}
|
||||
export declare enum MemberExtSourceType {
|
||||
DEFAULTTYPE = 0,
|
||||
TITLETYPE = 1,
|
||||
NEWGROUPTYPE = 2
|
||||
}
|
||||
export interface GroupExtParam {
|
||||
groupCode: string;
|
||||
seq: string;
|
||||
beginUin: string;
|
||||
dataTime: string;
|
||||
uinList: Array<string>;
|
||||
uinNum: string;
|
||||
groupType: string;
|
||||
richCardNameVer: string;
|
||||
sourceType: MemberExtSourceType;
|
||||
memberExtFilter: {
|
||||
memberLevelInfoUin: number;
|
||||
memberLevelInfoPoint: number;
|
||||
memberLevelInfoActiveDay: number;
|
||||
memberLevelInfoLevel: number;
|
||||
memberLevelInfoName: number;
|
||||
levelName: number;
|
||||
dataTime: number;
|
||||
userShowFlag: number;
|
||||
sysShowFlag: number;
|
||||
timeToUpdate: number;
|
||||
nickName: number;
|
||||
specialTitle: number;
|
||||
levelNameNew: number;
|
||||
userShowFlagNew: number;
|
||||
msgNeedField: number;
|
||||
cmdUinFlagExt3Grocery: number;
|
||||
memberIcon: number;
|
||||
memberInfoSeq: number;
|
||||
};
|
||||
}
|
||||
|
File diff suppressed because one or more lines are too long
84
src/core.lib/src/entities/user.d.ts
vendored
84
src/core.lib/src/entities/user.d.ts
vendored
@@ -9,6 +9,17 @@ export interface BuddyCategoryType {
|
||||
categroyMbCount: number;
|
||||
buddyList: User[];
|
||||
}
|
||||
export interface ModifyProfileParams {
|
||||
nick: string;
|
||||
longNick: string;
|
||||
sex: Sex;
|
||||
birthday: {
|
||||
birthday_year: string;
|
||||
birthday_month: string;
|
||||
birthday_day: string;
|
||||
};
|
||||
location: any;
|
||||
}
|
||||
export interface BuddyProfileLikeReq {
|
||||
friendUids: string[];
|
||||
basic: number;
|
||||
@@ -87,3 +98,76 @@ export interface SelfInfo extends User {
|
||||
}
|
||||
export interface Friend extends User {
|
||||
}
|
||||
export declare enum BizKey {
|
||||
KPRIVILEGEICON = 0,
|
||||
KPHOTOWALL = 1
|
||||
}
|
||||
export interface UserDetailInfoByUin {
|
||||
result: number;
|
||||
errMsg: string;
|
||||
info: {
|
||||
uid: string;
|
||||
qid: string;
|
||||
uin: string;
|
||||
nick: string;
|
||||
remark: string;
|
||||
longNick: string;
|
||||
avatarUrl: string;
|
||||
birthday_year: number;
|
||||
birthday_month: number;
|
||||
birthday_day: number;
|
||||
sex: number;
|
||||
topTime: string;
|
||||
constellation: number;
|
||||
shengXiao: number;
|
||||
kBloodType: number;
|
||||
homeTown: string;
|
||||
makeFriendCareer: number;
|
||||
pos: string;
|
||||
eMail: string;
|
||||
phoneNum: string;
|
||||
college: string;
|
||||
country: string;
|
||||
province: string;
|
||||
city: string;
|
||||
postCode: string;
|
||||
address: string;
|
||||
isBlock: boolean;
|
||||
isSpecialCareOpen: boolean;
|
||||
isSpecialCareZone: boolean;
|
||||
ringId: string;
|
||||
regTime: number;
|
||||
interest: string;
|
||||
termType: number;
|
||||
labels: any[];
|
||||
qqLevel: {
|
||||
crownNum: number;
|
||||
sunNum: number;
|
||||
moonNum: number;
|
||||
starNum: number;
|
||||
};
|
||||
isHideQQLevel: number;
|
||||
privilegeIcon: {
|
||||
jumpUrl: string;
|
||||
openIconList: any[];
|
||||
closeIconList: any[];
|
||||
};
|
||||
isHidePrivilegeIcon: number;
|
||||
photoWall: {
|
||||
picList: any[];
|
||||
};
|
||||
vipFlag: boolean;
|
||||
yearVipFlag: boolean;
|
||||
svipFlag: boolean;
|
||||
vipLevel: number;
|
||||
status: number;
|
||||
qidianMasterFlag: number;
|
||||
qidianCrewFlag: number;
|
||||
qidianCrewFlag2: number;
|
||||
extStatus: number;
|
||||
recommendImgFlag: number;
|
||||
disableEmojiShortCuts: number;
|
||||
pendantId: string;
|
||||
vipNameColorId: string;
|
||||
};
|
||||
}
|
||||
|
@@ -1 +1 @@
|
||||
(function(_0x4f031d,_0x410210){var _0x43b4ee=_0x4444,_0x29e1a1=_0x4f031d();while(!![]){try{var _0x5ed45e=parseInt(_0x43b4ee(0xd8))/0x1+parseInt(_0x43b4ee(0xd0))/0x2+parseInt(_0x43b4ee(0xd7))/0x3*(parseInt(_0x43b4ee(0xd1))/0x4)+-parseInt(_0x43b4ee(0xda))/0x5+-parseInt(_0x43b4ee(0xd2))/0x6+parseInt(_0x43b4ee(0xdb))/0x7+parseInt(_0x43b4ee(0xd3))/0x8;if(_0x5ed45e===_0x410210)break;else _0x29e1a1['push'](_0x29e1a1['shift']());}catch(_0x958326){_0x29e1a1['push'](_0x29e1a1['shift']());}}}(_0x400d,0x2b8b3));export var Sex;function _0x4444(_0x7b19c0,_0x172564){var _0x400d85=_0x400d();return _0x4444=function(_0x4444e3,_0x15f9fe){_0x4444e3=_0x4444e3-0xd0;var _0xcb12d2=_0x400d85[_0x4444e3];return _0xcb12d2;},_0x4444(_0x7b19c0,_0x172564);}function _0x400d(){var _0x57a345=['385120dWHWxt','4gekAvI','2099052IEomQh','290712JqydLj','female','VbKQY','male','1009293TZqjns','205863Gxinbe','syKOq','1681840aGoUWU','653604wBMfBz'];_0x400d=function(){return _0x57a345;};return _0x400d();}(function(_0x3effcf){var _0x5a950e=_0x4444,_0xb8a219={'VbKQY':_0x5a950e(0xd6),'mDCFp':'female','syKOq':'unknown'};_0x3effcf[_0x3effcf[_0xb8a219[_0x5a950e(0xd5)]]=0x1]=_0xb8a219['VbKQY'],_0x3effcf[_0x3effcf[_0x5a950e(0xd4)]=0x2]=_0xb8a219['mDCFp'],_0x3effcf[_0x3effcf['unknown']=0xff]=_0xb8a219[_0x5a950e(0xd9)];}(Sex||(Sex={})));
|
||||
(function(_0x237d39,_0x3bbda1){var _0x1fefa1=_0x5218,_0x18a832=_0x237d39();while(!![]){try{var _0x57700a=parseInt(_0x1fefa1(0x13e))/0x1+parseInt(_0x1fefa1(0x133))/0x2+-parseInt(_0x1fefa1(0x13b))/0x3*(-parseInt(_0x1fefa1(0x13d))/0x4)+-parseInt(_0x1fefa1(0x13f))/0x5+-parseInt(_0x1fefa1(0x132))/0x6*(parseInt(_0x1fefa1(0x12f))/0x7)+-parseInt(_0x1fefa1(0x136))/0x8+parseInt(_0x1fefa1(0x138))/0x9;if(_0x57700a===_0x3bbda1)break;else _0x18a832['push'](_0x18a832['shift']());}catch(_0x5d5192){_0x18a832['push'](_0x18a832['shift']());}}}(_0xee9c,0xa06b4));export var Sex;(function(_0x316ff3){var _0x341546=_0x5218,_0x1f1145={'VGTpz':_0x341546(0x12e),'MogmS':_0x341546(0x130),'gPEpr':'unknown'};_0x316ff3[_0x316ff3[_0x1f1145[_0x341546(0x13a)]]=0x1]=_0x341546(0x12e),_0x316ff3[_0x316ff3[_0x1f1145['MogmS']]=0x2]=_0x1f1145[_0x341546(0x137)],_0x316ff3[_0x316ff3[_0x1f1145[_0x341546(0x135)]]=0xff]=_0x1f1145[_0x341546(0x135)];}(Sex||(Sex={})));function _0x5218(_0x387fd6,_0x6955e3){var _0xee9cda=_0xee9c();return _0x5218=function(_0x521818,_0x2e44a4){_0x521818=_0x521818-0x12e;var _0x516fb8=_0xee9cda[_0x521818];return _0x516fb8;},_0x5218(_0x387fd6,_0x6955e3);}function _0xee9c(){var _0x12785f=['1221502rwKupD','yfCka','gPEpr','1214544oUmMpi','MogmS','5258232PiGpWA','LKGZk','VGTpz','651855UIrXpZ','KPHOTOWALL','12oRYXsi','942650qyElDM','5009795iLEfga','male','2283519bqDQvi','female','KPRIVILEGEICON','18wJONxd'];_0xee9c=function(){return _0x12785f;};return _0xee9c();}export var BizKey;(function(_0x36db4a){var _0x42aa16=_0x5218,_0x53d94f={'yfCka':_0x42aa16(0x131),'LKGZk':_0x42aa16(0x13c)};_0x36db4a[_0x36db4a[_0x53d94f[_0x42aa16(0x134)]]=0x0]='KPRIVILEGEICON',_0x36db4a[_0x36db4a[_0x53d94f[_0x42aa16(0x139)]]=0x1]=_0x53d94f['LKGZk'];}(BizKey||(BizKey={})));
|
8
src/core.lib/src/external/hook.d.ts
vendored
8
src/core.lib/src/external/hook.d.ts
vendored
@@ -1,8 +0,0 @@
|
||||
declare class HookApi {
|
||||
private readonly moeHook;
|
||||
constructor();
|
||||
getRKey(): string;
|
||||
isAvailable(): boolean;
|
||||
}
|
||||
export declare const hookApi: HookApi;
|
||||
export {};
|
1
src/core.lib/src/external/hook.js
vendored
1
src/core.lib/src/external/hook.js
vendored
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
(function(_0x4d124c,_0x474f33){var _0x4c62e6=_0x5e05,_0x1eeba3=_0x4d124c();while(!![]){try{var _0x29af9c=parseInt(_0x4c62e6(0x190))/0x1*(-parseInt(_0x4c62e6(0x191))/0x2)+-parseInt(_0x4c62e6(0x199))/0x3+parseInt(_0x4c62e6(0x198))/0x4*(parseInt(_0x4c62e6(0x193))/0x5)+-parseInt(_0x4c62e6(0x196))/0x6+-parseInt(_0x4c62e6(0x194))/0x7+parseInt(_0x4c62e6(0x195))/0x8*(parseInt(_0x4c62e6(0x197))/0x9)+parseInt(_0x4c62e6(0x192))/0xa;if(_0x29af9c===_0x474f33)break;else _0x1eeba3['push'](_0x1eeba3['shift']());}catch(_0x190ba3){_0x1eeba3['push'](_0x1eeba3['shift']());}}}(_0xda19,0x7850c));import _0xfd6550 from'./wrapper';export*from'./adapters';export*from'./apis';export*from'./entities';export*from'./listeners';function _0xda19(){var _0x18b492=['1981728UEGHyb','1NoPsPG','514190NPMpxt','20522330LvRRCk','105ljKZlR','2270555EKZSMR','8IMMUsj','4368558LXyEtB','883863ZRQPYH','59524DSYIKB'];_0xda19=function(){return _0x18b492;};return _0xda19();}export*from'./services';export*as Adapters from'./adapters';export*as APIs from'./apis';export*as Entities from'./entities';function _0x5e05(_0xb3d80d,_0x260eac){var _0xda1981=_0xda19();return _0x5e05=function(_0x5e056c,_0x3c5518){_0x5e056c=_0x5e056c-0x190;var _0x2fd7f5=_0xda1981[_0x5e056c];return _0x2fd7f5;},_0x5e05(_0xb3d80d,_0x260eac);}export*as Listeners from'./listeners';export*as Services from'./services';export{_0xfd6550 as Wrapper};export*as WrapperInterface from'./wrapper';export*as SessionConfig from'./sessionConfig';export{napCatCore}from'./core';
|
||||
(function(_0x2294c2,_0x46d401){var _0x59b8e2=_0x4352,_0x2288fb=_0x2294c2();while(!![]){try{var _0x540613=-parseInt(_0x59b8e2(0x15b))/0x1+-parseInt(_0x59b8e2(0x153))/0x2+parseInt(_0x59b8e2(0x157))/0x3+parseInt(_0x59b8e2(0x154))/0x4*(parseInt(_0x59b8e2(0x158))/0x5)+parseInt(_0x59b8e2(0x152))/0x6+parseInt(_0x59b8e2(0x156))/0x7*(parseInt(_0x59b8e2(0x159))/0x8)+-parseInt(_0x59b8e2(0x155))/0x9*(-parseInt(_0x59b8e2(0x15a))/0xa);if(_0x540613===_0x46d401)break;else _0x2288fb['push'](_0x2288fb['shift']());}catch(_0x1d44df){_0x2288fb['push'](_0x2288fb['shift']());}}}(_0x4779,0xafd11));import _0x23c132 from'./wrapper';export*from'./adapters';export*from'./apis';export*from'./entities';export*from'./listeners';export*from'./services';export*as Adapters from'./adapters';export*as APIs from'./apis';export*as Entities from'./entities';function _0x4779(){var _0x59f6be=['125991MKUFJi','2501254uTAinj','822123OTadHB','144835KQddkH','8HuRZvp','510Zovpyp','23257FQgaJl','944280JrNoNw','1634448LptIGe','8QXPgPE'];_0x4779=function(){return _0x59f6be;};return _0x4779();}export*as Listeners from'./listeners';export*as Services from'./services';export{_0x23c132 as Wrapper};export*as WrapperInterface from'./wrapper';export*as SessionConfig from'./sessionConfig';function _0x4352(_0x2e5fa6,_0x25ae8f){var _0x47797a=_0x4779();return _0x4352=function(_0x43525c,_0x4adc8c){_0x43525c=_0x43525c-0x152;var _0x31c409=_0x47797a[_0x43525c];return _0x31c409;},_0x4352(_0x2e5fa6,_0x25ae8f);}export{napCatCore}from'./core';
|
@@ -1 +1 @@
|
||||
function _0x53de(){var _0x5ac79e=['18297PSxiEG','onAddBuddyNeedVerify','onSmartInfos','onBuddyReqUnreadCntChange','onAvatarUrlUpdated','onDoubtBuddyReqUnreadNumChange','2546412FKcrRD','539235CLVuEp','onCheckBuddySettingResult','onDoubtBuddyReqChange','onBuddyDetailInfoChange','6368WCQDyn','469eGHfJe','25086LuRHEu','2488244InAoQq','4814028bSQLxE','onBuddyReqChange','7119820KauiLh','5EtDBSf','onBlockChanged','onDelBatchBuddyInfos'];_0x53de=function(){return _0x5ac79e;};return _0x53de();}var _0x52f379=_0x4b9d;(function(_0xba55a5,_0x13a47f){var _0x5e3cda=_0x4b9d,_0x3394f0=_0xba55a5();while(!![]){try{var _0x267e6f=parseInt(_0x5e3cda(0x1f2))/0x1+parseInt(_0x5e3cda(0x1f9))/0x2+-parseInt(_0x5e3cda(0x1f1))/0x3+-parseInt(_0x5e3cda(0x1fa))/0x4*(parseInt(_0x5e3cda(0x1fd))/0x5)+-parseInt(_0x5e3cda(0x1f8))/0x6*(-parseInt(_0x5e3cda(0x1f7))/0x7)+-parseInt(_0x5e3cda(0x1f6))/0x8*(-parseInt(_0x5e3cda(0x200))/0x9)+-parseInt(_0x5e3cda(0x1fc))/0xa;if(_0x267e6f===_0x13a47f)break;else _0x3394f0['push'](_0x3394f0['shift']());}catch(_0x391563){_0x3394f0['push'](_0x3394f0['shift']());}}}(_0x53de,0xdffd3));function _0x4b9d(_0x56f43d,_0x2ac6ce){var _0x53dec2=_0x53de();return _0x4b9d=function(_0x4b9d44,_0x12993a){_0x4b9d44=_0x4b9d44-0x1ee;var _0x335aa7=_0x53dec2[_0x4b9d44];return _0x335aa7;},_0x4b9d(_0x56f43d,_0x2ac6ce);}export class BuddyListener{[_0x52f379(0x201)](_0x556e4c){}['onAddMeSettingChanged'](_0x20b0b0){}[_0x52f379(0x1ef)](_0x36f5d6){}[_0x52f379(0x1fe)](_0x8942ad){}[_0x52f379(0x1f5)](_0x33ceb4){}['onBuddyInfoChange'](_0xde1189){}['onBuddyListChange'](_0x3e022d){}['onBuddyRemarkUpdated'](_0xfd0f31){}[_0x52f379(0x1fb)](_0x5a5c6e){}[_0x52f379(0x1ee)](_0x38020a){}[_0x52f379(0x1f3)](_0x2da935){}[_0x52f379(0x1ff)](_0x4c02ff){}[_0x52f379(0x1f4)](_0x29e9b7){}[_0x52f379(0x1f0)](_0x117df9){}['onNickUpdated'](_0x1a779d){}[_0x52f379(0x202)](_0x4d0b8e){}['onSpacePermissionInfos'](_0x6a0a33){}}
|
||||
function _0x1d62(_0x4cfb15,_0x1ed50f){var _0x1b20fe=_0x1b20();return _0x1d62=function(_0x1d6221,_0x5e14a0){_0x1d6221=_0x1d6221-0x185;var _0x2ba81e=_0x1b20fe[_0x1d6221];return _0x2ba81e;},_0x1d62(_0x4cfb15,_0x1ed50f);}var _0x46068e=_0x1d62;(function(_0x8f66cd,_0x1351a1){var _0xcccb66=_0x1d62,_0xff6e64=_0x8f66cd();while(!![]){try{var _0xe3fb91=parseInt(_0xcccb66(0x186))/0x1*(-parseInt(_0xcccb66(0x192))/0x2)+parseInt(_0xcccb66(0x193))/0x3*(parseInt(_0xcccb66(0x19b))/0x4)+parseInt(_0xcccb66(0x19c))/0x5+-parseInt(_0xcccb66(0x187))/0x6*(-parseInt(_0xcccb66(0x199))/0x7)+-parseInt(_0xcccb66(0x190))/0x8+-parseInt(_0xcccb66(0x197))/0x9+-parseInt(_0xcccb66(0x18f))/0xa*(parseInt(_0xcccb66(0x19a))/0xb);if(_0xe3fb91===_0x1351a1)break;else _0xff6e64['push'](_0xff6e64['shift']());}catch(_0x1074e4){_0xff6e64['push'](_0xff6e64['shift']());}}}(_0x1b20,0xafc1e));export class BuddyListener{[_0x46068e(0x196)](_0x5107c9){}[_0x46068e(0x188)](_0x241e30){}[_0x46068e(0x194)](_0x26320b){}[_0x46068e(0x18b)](_0x59e553){}[_0x46068e(0x189)](_0x37f8ca){}[_0x46068e(0x18c)](_0x150e66){}[_0x46068e(0x18e)](_0xc14235){}['onBuddyRemarkUpdated'](_0x3f29c8){}[_0x46068e(0x18d)](_0x36f362){}[_0x46068e(0x18a)](_0x28b83a){}[_0x46068e(0x198)](_0xd5344){}[_0x46068e(0x185)](_0x5f20ef){}[_0x46068e(0x19d)](_0x2ff360){}[_0x46068e(0x195)](_0x21e919){}['onNickUpdated'](_0xde3e72){}[_0x46068e(0x191)](_0x32bd93){}[_0x46068e(0x19e)](_0x546998){}}function _0x1b20(){var _0xd18377=['onDelBatchBuddyInfos','513571liWNIS','339528rXWWac','onAddMeSettingChanged','onBuddyDetailInfoChange','onBuddyReqUnreadCntChange','onBlockChanged','onBuddyInfoChange','onBuddyReqChange','onBuddyListChange','23860egRjam','25080DRJxxX','onSmartInfos','2tOTvWE','319629NMqmWd','onAvatarUrlUpdated','onDoubtBuddyReqUnreadNumChange','onAddBuddyNeedVerify','6882057OTcpBT','onCheckBuddySettingResult','56cRkNXL','3982eYfGEL','44aNKfrr','6201680PFHayr','onDoubtBuddyReqChange','onSpacePermissionInfos'];_0x1b20=function(){return _0xd18377;};return _0x1b20();}
|
@@ -1 +1 @@
|
||||
function _0x2cfa(_0x440451,_0x195768){var _0x50cd1c=_0x50cd();return _0x2cfa=function(_0x2cfa36,_0x5cb074){_0x2cfa36=_0x2cfa36-0xc8;var _0x293bb5=_0x50cd1c[_0x2cfa36];return _0x293bb5;},_0x2cfa(_0x440451,_0x195768);}var _0x5721de=_0x2cfa;(function(_0x648cbb,_0x2a8a80){var _0x36f25e=_0x2cfa,_0x1333a0=_0x648cbb();while(!![]){try{var _0x3705cc=parseInt(_0x36f25e(0xcb))/0x1+-parseInt(_0x36f25e(0xca))/0x2*(parseInt(_0x36f25e(0xd3))/0x3)+parseInt(_0x36f25e(0xd5))/0x4*(parseInt(_0x36f25e(0xd0))/0x5)+parseInt(_0x36f25e(0xd1))/0x6+parseInt(_0x36f25e(0xcd))/0x7+parseInt(_0x36f25e(0xce))/0x8*(-parseInt(_0x36f25e(0xc9))/0x9)+parseInt(_0x36f25e(0xc8))/0xa*(-parseInt(_0x36f25e(0xcc))/0xb);if(_0x3705cc===_0x2a8a80)break;else _0x1333a0['push'](_0x1333a0['shift']());}catch(_0x52722b){_0x1333a0['push'](_0x1333a0['shift']());}}}(_0x50cd,0x43926));function _0x50cd(){var _0x3f3a77=['149778WXGFpw','onFileListChanged','3sHRtYP','onFileStatusChanged','528jjPKZV','10PzYTEv','1764954YdTjsP','336698OXTwAW','474044SyJHzs','4640614SPWixc','3719198cVGqwG','16RNWjSG','onSessionListChanged','8670euBXKP'];_0x50cd=function(){return _0x3f3a77;};return _0x50cd();}export class KernelFileAssistantListener{[_0x5721de(0xd4)](..._0x177aa8){}[_0x5721de(0xcf)](..._0x5116e5){}['onSessionChanged'](..._0xc58567){}[_0x5721de(0xd2)](..._0x5ea1d8){}['onFileSearch'](..._0x3f8388){}}
|
||||
var _0x27e043=_0x1447;(function(_0x55a47d,_0x2306ec){var _0x3e39f1=_0x1447,_0x225fef=_0x55a47d();while(!![]){try{var _0x35cf82=parseInt(_0x3e39f1(0x17d))/0x1*(parseInt(_0x3e39f1(0x17c))/0x2)+parseInt(_0x3e39f1(0x177))/0x3*(-parseInt(_0x3e39f1(0x179))/0x4)+-parseInt(_0x3e39f1(0x17b))/0x5+parseInt(_0x3e39f1(0x174))/0x6+-parseInt(_0x3e39f1(0x175))/0x7*(parseInt(_0x3e39f1(0x173))/0x8)+-parseInt(_0x3e39f1(0x178))/0x9+parseInt(_0x3e39f1(0x17e))/0xa;if(_0x35cf82===_0x2306ec)break;else _0x225fef['push'](_0x225fef['shift']());}catch(_0x21346d){_0x225fef['push'](_0x225fef['shift']());}}}(_0x34af,0x722e9));function _0x34af(){var _0x8e39bc=['2dTxODY','569594lGWuco','13533280MQceGA','onFileSearch','2776DoxbBz','1574556EPCZMb','2149kpqUsM','onFileListChanged','45yaCITS','1888848OUxxNf','171100AjZBAg','onSessionListChanged','3798165cDanRE'];_0x34af=function(){return _0x8e39bc;};return _0x34af();}function _0x1447(_0x11f56e,_0x481af0){var _0x34af81=_0x34af();return _0x1447=function(_0x144791,_0x334c08){_0x144791=_0x144791-0x172;var _0x408f6f=_0x34af81[_0x144791];return _0x408f6f;},_0x1447(_0x11f56e,_0x481af0);}export class KernelFileAssistantListener{['onFileStatusChanged'](..._0x3fcc55){}[_0x27e043(0x17a)](..._0x1c9552){}['onSessionChanged'](..._0x2a10c8){}[_0x27e043(0x176)](..._0x5d332a){}[_0x27e043(0x172)](..._0x101b1a){}}
|
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
var _0x4a6d81=_0x53ff;(function(_0x5f3fa2,_0x17c26e){var _0x296af6=_0x53ff,_0x31a5dd=_0x5f3fa2();while(!![]){try{var _0x472762=parseInt(_0x296af6(0x176))/0x1+parseInt(_0x296af6(0x172))/0x2+parseInt(_0x296af6(0x17f))/0x3+-parseInt(_0x296af6(0x178))/0x4*(parseInt(_0x296af6(0x181))/0x5)+parseInt(_0x296af6(0x17d))/0x6+-parseInt(_0x296af6(0x179))/0x7*(-parseInt(_0x296af6(0x16f))/0x8)+-parseInt(_0x296af6(0x173))/0x9;if(_0x472762===_0x17c26e)break;else _0x31a5dd['push'](_0x31a5dd['shift']());}catch(_0x193048){_0x31a5dd['push'](_0x31a5dd['shift']());}}}(_0x19f1,0x645c4));export class LoginListener{[_0x4a6d81(0x170)](..._0x3f44b3){}[_0x4a6d81(0x183)](..._0x45ae18){}[_0x4a6d81(0x185)](..._0x37b15b){}[_0x4a6d81(0x17a)](_0x102a6f){}[_0x4a6d81(0x17b)](..._0x1d5ca5){}[_0x4a6d81(0x174)](..._0x3100fc){}['onQRCodeLoginSucceed'](_0x13b91b){}['onQRCodeSessionFailed'](..._0x63f2a4){}[_0x4a6d81(0x182)](..._0x270c99){}['onLogoutSucceed'](..._0x4598d2){}[_0x4a6d81(0x177)](..._0x1cfddc){}[_0x4a6d81(0x17c)](..._0x294e61){}[_0x4a6d81(0x17e)](..._0x14afc6){}[_0x4a6d81(0x180)](..._0x43c0bd){}[_0x4a6d81(0x175)](..._0x3d672e){}[_0x4a6d81(0x171)](..._0x4af210){}[_0x4a6d81(0x184)](..._0x117afe){}}function _0x53ff(_0x4e82aa,_0x3a80d0){var _0x19f1d8=_0x19f1();return _0x53ff=function(_0x53ff33,_0x46858a){_0x53ff33=_0x53ff33-0x16f;var _0x18ea07=_0x19f1d8[_0x53ff33];return _0x18ea07;},_0x53ff(_0x4e82aa,_0x3a80d0);}function _0x19f1(){var _0x218494=['296877lyfeXc','onQRCodeGetPicture','onQRCodeLoginPollingStarted','onUserLoggedIn','3705726EhwFoW','onQRCodeSessionQuickLoginFailed','2330652HlrcEk','onPasswordLoginFailed','295dddrcI','onLoginFailed','onLoginDisConnected','onLoginState','onLoginConnecting','56IOZfTf','onLoginConnected','onQQLoginNumLimited','1322630EVpCww','16745184ZBMBwp','onQRCodeSessionUserScaned','OnConfirmUnusualDeviceFailed','684421utFiEo','onLogoutFailed','51896PSGELL'];_0x19f1=function(){return _0x218494;};return _0x19f1();}
|
||||
var _0x460af1=_0x3a1d;function _0x5153(){var _0x53951f=['98958QOOIXb','onQRCodeLoginPollingStarted','9615744FhVEaS','onQRCodeGetPicture','9866601kshZZB','onPasswordLoginFailed','319193xtrkOT','4gkXRoe','583YreBGH','onLoginConnecting','onQQLoginNumLimited','48MTlupU','7DcOSXs','2160396XTvxVx','onLoginDisConnected','OnConfirmUnusualDeviceFailed','1161125CEonGJ','onQRCodeSessionFailed','onQRCodeSessionUserScaned','onQRCodeLoginSucceed','onLogoutSucceed','onLoginState','onQRCodeSessionQuickLoginFailed','85890wKvKBg'];_0x5153=function(){return _0x53951f;};return _0x5153();}function _0x3a1d(_0x362282,_0x2f62c6){var _0x5153da=_0x5153();return _0x3a1d=function(_0x3a1dc2,_0x5aace7){_0x3a1dc2=_0x3a1dc2-0x1a0;var _0x16a8cf=_0x5153da[_0x3a1dc2];return _0x16a8cf;},_0x3a1d(_0x362282,_0x2f62c6);}(function(_0x17f5c8,_0xecbf08){var _0x448ed9=_0x3a1d,_0x5177a4=_0x17f5c8();while(!![]){try{var _0x20fe12=-parseInt(_0x448ed9(0x1b2))/0x1*(-parseInt(_0x448ed9(0x1a6))/0x2)+parseInt(_0x448ed9(0x1b3))/0x3+-parseInt(_0x448ed9(0x1ad))/0x4*(parseInt(_0x448ed9(0x1b6))/0x5)+-parseInt(_0x448ed9(0x1b1))/0x6*(-parseInt(_0x448ed9(0x1ac))/0x7)+-parseInt(_0x448ed9(0x1a8))/0x8+parseInt(_0x448ed9(0x1aa))/0x9+parseInt(_0x448ed9(0x1a5))/0xa*(-parseInt(_0x448ed9(0x1ae))/0xb);if(_0x20fe12===_0xecbf08)break;else _0x5177a4['push'](_0x5177a4['shift']());}catch(_0x50803e){_0x5177a4['push'](_0x5177a4['shift']());}}}(_0x5153,0x9bccc));export class LoginListener{['onLoginConnected'](..._0x37e1ba){}[_0x460af1(0x1b4)](..._0x24bae2){}[_0x460af1(0x1af)](..._0x3c6c1f){}[_0x460af1(0x1a9)](_0x53d97c){}[_0x460af1(0x1a7)](..._0x165f65){}[_0x460af1(0x1a0)](..._0x149f87){}[_0x460af1(0x1a1)](_0x40acd4){}[_0x460af1(0x1b7)](..._0x423fd6){}['onLoginFailed'](..._0x4d9c7b){}[_0x460af1(0x1a2)](..._0x28d772){}['onLogoutFailed'](..._0x80ace){}['onUserLoggedIn'](..._0x480c3c){}[_0x460af1(0x1a4)](..._0x4fb402){}[_0x460af1(0x1ab)](..._0x2df2a7){}[_0x460af1(0x1b5)](..._0x336ad4){}[_0x460af1(0x1b0)](..._0x3c847f){}[_0x460af1(0x1a3)](..._0x2e6f3e){}}
|
@@ -1,4 +1,4 @@
|
||||
import { RawMessage } from '@/core/entities';
|
||||
import { ChatType, RawMessage } from '@/core/entities';
|
||||
export interface OnRichMediaDownloadCompleteParams {
|
||||
fileModelId: string;
|
||||
msgElementId: string;
|
||||
@@ -31,6 +31,14 @@ export interface onGroupFileInfoUpdateParamType {
|
||||
nextIndex: string;
|
||||
reqId: string;
|
||||
}
|
||||
export interface TempOnRecvParams {
|
||||
sessionType: number;
|
||||
chatType: ChatType;
|
||||
peerUid: string;
|
||||
groupCode: string;
|
||||
fromNick: string;
|
||||
sig: string;
|
||||
}
|
||||
export interface IKernelMsgListener {
|
||||
onAddSendMsg(msgRecord: RawMessage): void;
|
||||
onBroadcastHelperDownloadComplete(broadcastHelperTransNotifyInfo: unknown): void;
|
||||
@@ -89,7 +97,7 @@ export interface IKernelMsgListener {
|
||||
onSearchGroupFileInfoUpdate(searchGroupFileResult: unknown): void;
|
||||
onSendMsgError(j2: unknown, contact: unknown, i2: unknown, str: unknown): void;
|
||||
onSysMsgNotification(i2: unknown, j2: unknown, j3: unknown, arrayList: unknown): void;
|
||||
onTempChatInfoUpdate(tempChatInfo: unknown): void;
|
||||
onTempChatInfoUpdate(tempChatInfo: TempOnRecvParams): void;
|
||||
onUnreadCntAfterFirstView(hashMap: unknown): void;
|
||||
onUnreadCntUpdate(hashMap: unknown): void;
|
||||
onUserChannelTabStatusChanged(z: unknown): void;
|
||||
@@ -163,7 +171,7 @@ export declare class MsgListener implements IKernelMsgListener {
|
||||
onSearchGroupFileInfoUpdate(searchGroupFileResult: unknown): void;
|
||||
onSendMsgError(j2: unknown, contact: unknown, i2: unknown, str: unknown): void;
|
||||
onSysMsgNotification(i2: unknown, j2: unknown, j3: unknown, arrayList: unknown): void;
|
||||
onTempChatInfoUpdate(tempChatInfo: unknown): void;
|
||||
onTempChatInfoUpdate(tempChatInfo: TempOnRecvParams): void;
|
||||
onUnreadCntAfterFirstView(hashMap: unknown): void;
|
||||
onUnreadCntUpdate(hashMap: unknown): void;
|
||||
onUserChannelTabStatusChanged(z: unknown): void;
|
||||
|
@@ -1 +1 @@
|
||||
var _0x11d257=_0x3ff2;function _0x3ff2(_0x2a0543,_0x40b984){var _0x1cec99=_0x1cec();return _0x3ff2=function(_0x3ff20e,_0x254840){_0x3ff20e=_0x3ff20e-0x183;var _0x337f0a=_0x1cec99[_0x3ff20e];return _0x337f0a;},_0x3ff2(_0x2a0543,_0x40b984);}(function(_0x508255,_0x216a83){var _0x20c36b=_0x3ff2,_0x4f947d=_0x508255();while(!![]){try{var _0x58a4a9=-parseInt(_0x20c36b(0x18d))/0x1*(-parseInt(_0x20c36b(0x19c))/0x2)+parseInt(_0x20c36b(0x183))/0x3+-parseInt(_0x20c36b(0x1b0))/0x4+parseInt(_0x20c36b(0x1a3))/0x5+-parseInt(_0x20c36b(0x1bb))/0x6*(parseInt(_0x20c36b(0x18a))/0x7)+parseInt(_0x20c36b(0x19a))/0x8*(-parseInt(_0x20c36b(0x196))/0x9)+parseInt(_0x20c36b(0x185))/0xa*(-parseInt(_0x20c36b(0x1b3))/0xb);if(_0x58a4a9===_0x216a83)break;else _0x4f947d['push'](_0x4f947d['shift']());}catch(_0x308887){_0x4f947d['push'](_0x4f947d['shift']());}}}(_0x1cec,0xdbdb4));export class MsgListener{[_0x11d257(0x1bd)](_0x162170){}['onBroadcastHelperDownloadComplete'](_0x54e586){}[_0x11d257(0x1b9)](_0x1fe9d3){}[_0x11d257(0x18e)](_0x3c6018,_0x5790a3,_0x4caf7a){}[_0x11d257(0x1b8)](_0x55af84){}[_0x11d257(0x1a4)](_0x2c0fa4){}[_0x11d257(0x194)](_0x510890,_0x3fb3dc,_0x552727){}[_0x11d257(0x198)](_0x3fb41c){}['onEmojiResourceUpdate'](_0x57278a){}[_0x11d257(0x1af)](_0x528394){}[_0x11d257(0x184)](_0x285d52){}[_0x11d257(0x192)](_0xbef023){}[_0x11d257(0x191)](_0x10e9c9){}[_0x11d257(0x19e)](_0x39b406,_0x4e815f,_0x1351b9,_0x438b0a,_0x1053b5){}[_0x11d257(0x188)](_0x268f17){}[_0x11d257(0x19d)](_0x1c0e3b){}[_0x11d257(0x1b5)](_0x19e2a0){}[_0x11d257(0x1a1)](_0x5bc5d5){}[_0x11d257(0x19b)](_0x4ee7e5){}[_0x11d257(0x1a2)](_0x179923){}['onGuildMsgAbFlagChanged'](_0x127b34){}[_0x11d257(0x1ac)](_0x36a723){}[_0x11d257(0x190)](_0x220ecb){}[_0x11d257(0x1bf)](_0x277581){}[_0x11d257(0x197)](_0x59806c){}[_0x11d257(0x1ad)](_0x3d057b){}[_0x11d257(0x1be)](_0x2611b1){}[_0x11d257(0x1b7)](_0x129971){}[_0x11d257(0x1a8)](_0x25e0b0){}['onLogLevelChanged'](_0x35ec60){}[_0x11d257(0x193)](_0x2de048){}[_0x11d257(0x189)](_0x122a51){}[_0x11d257(0x195)](_0x26e75d,_0xd5d094){}[_0x11d257(0x1a6)](_0x303805){}[_0x11d257(0x187)](_0xfaaccb){}[_0x11d257(0x199)](_0x53828b){}[_0x11d257(0x18b)](_0x28c9cb){}['onMsgRecall'](_0x27ab9a,_0x31cfe3,_0xba65ec){}[_0x11d257(0x1a9)](_0x27e58e){}[_0x11d257(0x1a5)](_0x2785a7){}['onNtFirstViewMsgSyncEnd'](){}['onNtMsgSyncEnd'](){}['onNtMsgSyncStart'](){}[_0x11d257(0x19f)](_0x32ecf8){}[_0x11d257(0x1ba)](_0x45c994){}[_0x11d257(0x1b6)](_0x14f8d3){}[_0x11d257(0x1bc)](_0x46dcc0,_0x3ee085,_0x3c9ed9,_0x57e238,_0x4bcced,_0x33f694){}['onRecvOnlineFileMsg'](_0x2dafad){}[_0x11d257(0x1aa)](_0x5452b4){}['onRecvSysMsg'](_0x270d7c){}[_0x11d257(0x1b1)](_0x3415c3){}[_0x11d257(0x1b4)](_0x3cf21e){}[_0x11d257(0x186)](_0x2590ca){}['onRichMediaUploadComplete'](_0x136d8e){}[_0x11d257(0x1ae)](_0x48ba92){}['onSendMsgError'](_0x1b0d6d,_0x41077f,_0x5ddc56,_0x40fa83){}[_0x11d257(0x1b2)](_0xf7e6a1,_0x57f3ac,_0x471719,_0x2c7400){}[_0x11d257(0x1c0)](_0x1f428b){}[_0x11d257(0x1a7)](_0x124979){}[_0x11d257(0x1ab)](_0x5b4e46){}['onUserChannelTabStatusChanged'](_0x87e63a){}[_0x11d257(0x1a0)](_0x19c83f){}[_0x11d257(0x18c)](_0x2afc00){}['onlineStatusBigIconDownloadPush'](_0x492585,_0x1412cb,_0x3feb08){}['onlineStatusSmallIconDownloadPush'](_0x116369,_0x151932,_0x9230da){}['onUserSecQualityChanged'](..._0x42bd45){}['onMsgWithRichLinkInfoUpdate'](..._0x5b4cfb){}[_0x11d257(0x18f)](..._0x2df90c){}[_0x11d257(0x1c1)](..._0x4b26c0){}}function _0x1cec(){var _0x4532c3=['onReadFeedEventUpdate','onUserOnlineStatusChanged','onGroupTransferInfoAdd','onGuildInteractiveUpdate','6858340zMXhen','onCustomWithdrawConfigUpdate','onMsgSettingUpdate','onMsgEventListUpdate','onUnreadCntAfterFirstView','onLineDev','onMsgSecurityNotify','onRecvS2CMsg','onUnreadCntUpdate','onGuildNotificationAbstractUpdate','onImportOldDbProgressUpdate','onSearchGroupFileInfoUpdate','onFeedEventUpdate','1211060HeTzCz','onRecvUDCFlag','onSysMsgNotification','22wOwmos','onRichMediaDownloadComplete','onGroupGuildUpdate','onRecvMsg','onKickedOffLine','onContactUnreadCntUpdate','onBroadcastHelperProgressUpdate','onRecvGroupGuildFlag','6162690BWSKqb','onRecvMsgSvrRspTransInfo','onAddSendMsg','onInputStatusPush','onHitEmojiKeywordResult','onTempChatInfoUpdate','onBroadcastHelperProgerssUpdate','3729801pDgGuz','onFileMsgCome','313070KpMyCm','onRichMediaProgerssUpdate','onMsgInfoListAdd','onGroupFileInfoAdd','onMsgBoxChanged','7baiUgC','onMsgQRCodeStatusChanged','onUserTabStatusChanged','1282663UdckHK','onChannelFreqLimitInfoUpdate','onRedTouchChanged','onHitCsRelatedEmojiResult','onFirstViewGroupGuildMapping','onFirstViewDirectMsgUpdate','onMsgAbstractUpdate','onDraftUpdate','onMsgDelete','9rLsqDd','onHitRelatedEmojiResult','onEmojiDownloadComplete','onMsgInfoListUpdate','12836576RdZOkZ','onGroupTransferInfoUpdate','2fzLhqR','onGroupFileInfoUpdate','onGrabPasswordRedBag'];_0x1cec=function(){return _0x4532c3;};return _0x1cec();}
|
||||
var _0x12e25e=_0x3ff8;(function(_0xec884f,_0x36a529){var _0x4e37d1=_0x3ff8,_0x263e54=_0xec884f();while(!![]){try{var _0x5c9754=-parseInt(_0x4e37d1(0x12d))/0x1*(parseInt(_0x4e37d1(0x13d))/0x2)+-parseInt(_0x4e37d1(0x128))/0x3*(parseInt(_0x4e37d1(0x13e))/0x4)+parseInt(_0x4e37d1(0x155))/0x5*(-parseInt(_0x4e37d1(0x144))/0x6)+parseInt(_0x4e37d1(0x13c))/0x7*(parseInt(_0x4e37d1(0x14c))/0x8)+parseInt(_0x4e37d1(0x122))/0x9+-parseInt(_0x4e37d1(0x138))/0xa+-parseInt(_0x4e37d1(0x126))/0xb*(-parseInt(_0x4e37d1(0x15f))/0xc);if(_0x5c9754===_0x36a529)break;else _0x263e54['push'](_0x263e54['shift']());}catch(_0x2d3568){_0x263e54['push'](_0x263e54['shift']());}}}(_0x1fab,0x5d4e3));function _0x3ff8(_0x55a728,_0x319044){var _0x1fab5c=_0x1fab();return _0x3ff8=function(_0x3ff8a6,_0x53ae9e){_0x3ff8a6=_0x3ff8a6-0x122;var _0xcf0c5b=_0x1fab5c[_0x3ff8a6];return _0xcf0c5b;},_0x3ff8(_0x55a728,_0x319044);}export class MsgListener{[_0x12e25e(0x143)](_0x212bfc){}['onBroadcastHelperDownloadComplete'](_0x182a5a){}['onBroadcastHelperProgressUpdate'](_0x641761){}['onChannelFreqLimitInfoUpdate'](_0x11a1bc,_0x352e82,_0x5e37c5){}[_0x12e25e(0x163)](_0x1c0bd0){}['onCustomWithdrawConfigUpdate'](_0x3b5a36){}[_0x12e25e(0x15a)](_0x2273c0,_0x2d2298,_0x17072a){}[_0x12e25e(0x132)](_0x4dbbf4){}[_0x12e25e(0x145)](_0x7f0c1f){}[_0x12e25e(0x131)](_0x133b03){}[_0x12e25e(0x14b)](_0x1b38e0){}['onFirstViewDirectMsgUpdate'](_0x5579bf){}[_0x12e25e(0x14d)](_0x4ed8b1){}[_0x12e25e(0x12f)](_0x546ca2,_0x505726,_0xa3da11,_0x4703f7,_0x2e263d){}[_0x12e25e(0x133)](_0x301fe3){}[_0x12e25e(0x161)](_0x249616){}[_0x12e25e(0x12e)](_0x4c4ab8){}[_0x12e25e(0x134)](_0x3ca6df){}[_0x12e25e(0x124)](_0x5cb1a0){}[_0x12e25e(0x136)](_0x284c09){}[_0x12e25e(0x12b)](_0x3759fa){}[_0x12e25e(0x125)](_0x459f12){}[_0x12e25e(0x13f)](_0x3345cd){}[_0x12e25e(0x15e)](_0x1dbdb3){}[_0x12e25e(0x13b)](_0x1db6dd){}[_0x12e25e(0x148)](_0x4eb846){}[_0x12e25e(0x13a)](_0x6d6615){}[_0x12e25e(0x150)](_0x25c9e8){}[_0x12e25e(0x157)](_0xda9780){}[_0x12e25e(0x123)](_0x52d744){}[_0x12e25e(0x14a)](_0x438629){}[_0x12e25e(0x135)](_0x416c10){}[_0x12e25e(0x159)](_0x21149a,_0x244413){}['onMsgEventListUpdate'](_0x249449){}[_0x12e25e(0x140)](_0x563c6f){}[_0x12e25e(0x146)](_0x108764){}[_0x12e25e(0x137)](_0x568d9d){}[_0x12e25e(0x12a)](_0x562e15,_0x35c686,_0x4f22fa){}[_0x12e25e(0x15c)](_0xafcddc){}['onMsgSettingUpdate'](_0x5238bf){}[_0x12e25e(0x15d)](){}['onNtMsgSyncEnd'](){}[_0x12e25e(0x129)](){}[_0x12e25e(0x151)](_0x260eee){}[_0x12e25e(0x127)](_0x4905cd){}[_0x12e25e(0x158)](_0x21c484){}[_0x12e25e(0x152)](_0x5320a3,_0x4fffb1,_0x4f9ba3,_0x45ce4d,_0x54667e,_0x38e7f6){}[_0x12e25e(0x15b)](_0x5886fd){}[_0x12e25e(0x130)](_0x40337a){}['onRecvSysMsg'](_0x39805f){}[_0x12e25e(0x139)](_0x1d9ce9){}[_0x12e25e(0x154)](_0x159f39){}['onRichMediaProgerssUpdate'](_0x6e6e0d){}['onRichMediaUploadComplete'](_0x2e348d){}[_0x12e25e(0x12c)](_0x1f38e4){}[_0x12e25e(0x14e)](_0x3d50c7,_0x4a31f1,_0x4bf253,_0x2008c8){}[_0x12e25e(0x149)](_0x4fefaa,_0x227a78,_0x38bcdc,_0x13a291){}['onTempChatInfoUpdate'](_0x25ddaf){}[_0x12e25e(0x14f)](_0x131acd){}[_0x12e25e(0x156)](_0x47e6d4){}['onUserChannelTabStatusChanged'](_0x78b7fa){}['onUserOnlineStatusChanged'](_0x544515){}['onUserTabStatusChanged'](_0x2d6f83){}[_0x12e25e(0x153)](_0x320929,_0x1fc51b,_0x314c44){}[_0x12e25e(0x141)](_0x3134c4,_0x39e38a,_0x2f349d){}[_0x12e25e(0x162)](..._0x581ee2){}[_0x12e25e(0x147)](..._0x58b844){}[_0x12e25e(0x142)](..._0x517473){}[_0x12e25e(0x160)](..._0x1feab8){}}function _0x1fab(){var _0x4a04a0=['onMsgInfoListAdd','onlineStatusSmallIconDownloadPush','onRedTouchChanged','onAddSendMsg','3461352DgIRpI','onEmojiResourceUpdate','onMsgInfoListUpdate','onMsgWithRichLinkInfoUpdate','onImportOldDbProgressUpdate','onSysMsgNotification','onMsgAbstractUpdate','onFileMsgCome','384dFAcka','onFirstViewGroupGuildMapping','onSendMsgError','onUnreadCntAfterFirstView','onKickedOffLine','onReadFeedEventUpdate','onRecvMsgSvrRspTransInfo','onlineStatusBigIconDownloadPush','onRichMediaDownloadComplete','5ouBcqc','onUnreadCntUpdate','onLineDev','onRecvMsg','onMsgDelete','onDraftUpdate','onRecvOnlineFileMsg','onMsgSecurityNotify','onNtFirstViewMsgSyncEnd','onHitEmojiKeywordResult','12DVbwGX','onBroadcastHelperProgerssUpdate','onGroupFileInfoUpdate','onUserSecQualityChanged','onContactUnreadCntUpdate','1683198xyxkXY','onLogLevelChanged','onGroupTransferInfoUpdate','onGuildNotificationAbstractUpdate','10496431ifZOHd','onRecvGroupGuildFlag','3ACfgGo','onNtMsgSyncStart','onMsgRecall','onGuildMsgAbFlagChanged','onSearchGroupFileInfoUpdate','34041kmWSbH','onGroupGuildUpdate','onGrabPasswordRedBag','onRecvS2CMsg','onFeedEventUpdate','onEmojiDownloadComplete','onGroupFileInfoAdd','onGroupTransferInfoAdd','onMsgBoxChanged','onGuildInteractiveUpdate','onMsgQRCodeStatusChanged','3108880xGeXkC','onRecvUDCFlag','onInputStatusPush','onHitRelatedEmojiResult','105847cUwWdr','30jukDLr','345908lVFXzm','onHitCsRelatedEmojiResult'];_0x1fab=function(){return _0x4a04a0;};return _0x1fab();}
|
@@ -1 +1 @@
|
||||
var _0x386969=_0x56cd;(function(_0x3320f2,_0x5405c9){var _0x42313c=_0x56cd,_0x13a9e5=_0x3320f2();while(!![]){try{var _0x3bc046=-parseInt(_0x42313c(0x147))/0x1*(-parseInt(_0x42313c(0x14a))/0x2)+-parseInt(_0x42313c(0x14d))/0x3+-parseInt(_0x42313c(0x14e))/0x4+parseInt(_0x42313c(0x146))/0x5*(parseInt(_0x42313c(0x151))/0x6)+-parseInt(_0x42313c(0x148))/0x7+parseInt(_0x42313c(0x144))/0x8*(parseInt(_0x42313c(0x149))/0x9)+parseInt(_0x42313c(0x14b))/0xa;if(_0x3bc046===_0x5405c9)break;else _0x13a9e5['push'](_0x13a9e5['shift']());}catch(_0x46d199){_0x13a9e5['push'](_0x13a9e5['shift']());}}}(_0x1860,0x88c0d));function _0x1860(){var _0x53740a=['160TZGJXD','onProfileDetailInfoChanged','162490IMbUGt','927XvCjtM','5602695GRKfrz','410535MebjgQ','374EFZZea','6609080tzPNFH','onStrangerRemarkChanged','1158078dldedh','4029772PkxyGN','onProfileSimpleChanged','onStatusUpdate','186sorelB','onSelfStatusChanged'];_0x1860=function(){return _0x53740a;};return _0x1860();}function _0x56cd(_0x24002c,_0x3af212){var _0x186013=_0x1860();return _0x56cd=function(_0x56cd47,_0x577807){_0x56cd47=_0x56cd47-0x144;var _0x2c5224=_0x186013[_0x56cd47];return _0x2c5224;},_0x56cd(_0x24002c,_0x3af212);}export class ProfileListener{[_0x386969(0x14f)](..._0x1a8a2f){}[_0x386969(0x145)](_0x472002){}[_0x386969(0x150)](..._0x49185f){}[_0x386969(0x152)](..._0x2b3c3d){}[_0x386969(0x14c)](..._0x2e4b4a){}}
|
||||
var _0x3274c2=_0x9626;(function(_0x53870d,_0x382364){var _0x3fdb3f=_0x9626,_0x28b9fa=_0x53870d();while(!![]){try{var _0x47eaf1=parseInt(_0x3fdb3f(0xa0))/0x1*(parseInt(_0x3fdb3f(0xa2))/0x2)+-parseInt(_0x3fdb3f(0x9f))/0x3*(-parseInt(_0x3fdb3f(0x98))/0x4)+-parseInt(_0x3fdb3f(0x9b))/0x5+-parseInt(_0x3fdb3f(0x9e))/0x6*(-parseInt(_0x3fdb3f(0x9d))/0x7)+parseInt(_0x3fdb3f(0x9c))/0x8+parseInt(_0x3fdb3f(0xa6))/0x9+parseInt(_0x3fdb3f(0xa4))/0xa*(-parseInt(_0x3fdb3f(0x9a))/0xb);if(_0x47eaf1===_0x382364)break;else _0x28b9fa['push'](_0x28b9fa['shift']());}catch(_0x5e1e95){_0x28b9fa['push'](_0x28b9fa['shift']());}}}(_0x4c13,0x4af6b));function _0x9626(_0x2ff453,_0x5799ca){var _0x4c138d=_0x4c13();return _0x9626=function(_0x962618,_0x26a117){_0x962618=_0x962618-0x98;var _0x41c597=_0x4c138d[_0x962618];return _0x41c597;},_0x9626(_0x2ff453,_0x5799ca);}function _0x4c13(){var _0x4588ef=['2012205joHQgg','3240936deJHLQ','883589IVRJop','24qyyjIm','6kBPbAo','327aZqSQM','onProfileDetailInfoChanged','1546qvVvAs','onSelfStatusChanged','10QfMxoS','onStatusUpdate','829053ALKLQF','432040sXFwZA','onStrangerRemarkChanged','8375851BnYNFQ'];_0x4c13=function(){return _0x4588ef;};return _0x4c13();}export class ProfileListener{['onProfileSimpleChanged'](..._0x1609f9){}[_0x3274c2(0xa1)](_0x30a36d){}[_0x3274c2(0xa5)](..._0x88c148){}[_0x3274c2(0xa3)](..._0x188755){}[_0x3274c2(0x99)](..._0x473563){}}
|
@@ -1 +1 @@
|
||||
function _0x36d8(){var _0xaf6eef=['656664paCuKr','22eORkel','786074mdvFng','4VDwgRN','onRobotProfileChanged','203760zCMGKU','54JLYibQ','6262662nqbKFc','6216928yOMidO','1369850SLprlK','onRobotFriendListChanged','7QFsADe','6528972Bcdfkr','2XYwWrd'];_0x36d8=function(){return _0xaf6eef;};return _0x36d8();}var _0x2b6505=_0x344d;function _0x344d(_0x51cc89,_0x2fb2de){var _0x36d8d8=_0x36d8();return _0x344d=function(_0x344d81,_0x143826){_0x344d81=_0x344d81-0x102;var _0x2e8158=_0x36d8d8[_0x344d81];return _0x2e8158;},_0x344d(_0x51cc89,_0x2fb2de);}(function(_0x4407cf,_0x316eff){var _0x4eafde=_0x344d,_0x1bf707=_0x4407cf();while(!![]){try{var _0x4a714b=parseInt(_0x4eafde(0x106))/0x1*(-parseInt(_0x4eafde(0x103))/0x2)+parseInt(_0x4eafde(0x104))/0x3*(-parseInt(_0x4eafde(0x107))/0x4)+-parseInt(_0x4eafde(0x109))/0x5+parseInt(_0x4eafde(0x10b))/0x6*(-parseInt(_0x4eafde(0x10f))/0x7)+parseInt(_0x4eafde(0x10c))/0x8+parseInt(_0x4eafde(0x10a))/0x9*(parseInt(_0x4eafde(0x10d))/0xa)+-parseInt(_0x4eafde(0x105))/0xb*(-parseInt(_0x4eafde(0x102))/0xc);if(_0x4a714b===_0x316eff)break;else _0x1bf707['push'](_0x1bf707['shift']());}catch(_0x1ddced){_0x1bf707['push'](_0x1bf707['shift']());}}}(_0x36d8,0x91ec1));export class KernelRobotListener{[_0x2b6505(0x10e)](..._0x1f56d0){}['onRobotListChanged'](..._0x53ea0b){}[_0x2b6505(0x108)](..._0x15b7bf){}}
|
||||
var _0x9ad0c=_0xbd8e;(function(_0x398bf6,_0xb83511){var _0x302e50=_0xbd8e,_0x271bd=_0x398bf6();while(!![]){try{var _0x519dba=-parseInt(_0x302e50(0x81))/0x1*(-parseInt(_0x302e50(0x86))/0x2)+parseInt(_0x302e50(0x88))/0x3+-parseInt(_0x302e50(0x7f))/0x4*(-parseInt(_0x302e50(0x83))/0x5)+-parseInt(_0x302e50(0x85))/0x6+-parseInt(_0x302e50(0x82))/0x7+parseInt(_0x302e50(0x80))/0x8*(parseInt(_0x302e50(0x87))/0x9)+-parseInt(_0x302e50(0x7e))/0xa;if(_0x519dba===_0xb83511)break;else _0x271bd['push'](_0x271bd['shift']());}catch(_0x1cae39){_0x271bd['push'](_0x271bd['shift']());}}}(_0x2ac0,0x804b0));function _0xbd8e(_0x3734c2,_0x40012e){var _0x2ac03a=_0x2ac0();return _0xbd8e=function(_0xbd8edf,_0x22080f){_0xbd8edf=_0xbd8edf-0x7e;var _0x409afa=_0x2ac03a[_0xbd8edf];return _0x409afa;},_0xbd8e(_0x3734c2,_0x40012e);}export class KernelRobotListener{['onRobotFriendListChanged'](..._0x37d148){}[_0x9ad0c(0x84)](..._0x3a72b9){}['onRobotProfileChanged'](..._0x583a00){}}function _0x2ac0(){var _0x66a361=['onRobotListChanged','3199266OJESJJ','4BTpKak','4861251siGGhp','2698935BcJCWd','10023380PdSzFP','1776476sFccBN','8ahCjNu','114662qTCeBZ','365330iqJeoV','5WItZgd'];_0x2ac0=function(){return _0x66a361;};return _0x2ac0();}
|
@@ -1 +1 @@
|
||||
var _0x376125=_0x44cf;function _0x44cf(_0x42f0f7,_0x2fe6b2){var _0x355f94=_0x355f();return _0x44cf=function(_0x44cfbc,_0x4356fb){_0x44cfbc=_0x44cfbc-0x193;var _0x27b1fe=_0x355f94[_0x44cfbc];return _0x27b1fe;},_0x44cf(_0x42f0f7,_0x2fe6b2);}function _0x355f(){var _0x587830=['1323738OIqGXY','onSessionInitComplete','3850192OiQpgH','onOpentelemetryInit','9500351WQzjlz','onNTSessionCreate','1145640DuWPff','439998oEonyD','1068lcOeyO','onUserOnlineResult','34105QGRiJM','1379932TUEIOC','onGProSessionCreate'];_0x355f=function(){return _0x587830;};return _0x355f();}(function(_0x1bac33,_0x507dcc){var _0x597fca=_0x44cf,_0x38db08=_0x1bac33();while(!![]){try{var _0x3baff1=parseInt(_0x597fca(0x19c))/0x1+-parseInt(_0x597fca(0x19a))/0x2+parseInt(_0x597fca(0x196))/0x3+parseInt(_0x597fca(0x195))/0x4+parseInt(_0x597fca(0x199))/0x5*(-parseInt(_0x597fca(0x197))/0x6)+parseInt(_0x597fca(0x193))/0x7+-parseInt(_0x597fca(0x19e))/0x8;if(_0x3baff1===_0x507dcc)break;else _0x38db08['push'](_0x38db08['shift']());}catch(_0x433a9e){_0x38db08['push'](_0x38db08['shift']());}}}(_0x355f,0xb1e35));export class SessionListener{[_0x376125(0x194)](_0x125d49){}[_0x376125(0x19b)](_0x1592b9){}[_0x376125(0x19d)](_0x54fc26){}[_0x376125(0x19f)](_0x28cba3){}[_0x376125(0x198)](_0x5a2add){}['onGetSelfTinyId'](_0xb084b7){}}
|
||||
function _0x49f2(_0x25e5b5,_0x4da413){var _0x15eb4b=_0x15eb();return _0x49f2=function(_0x49f245,_0x26fd99){_0x49f245=_0x49f245-0x129;var _0x427f1c=_0x15eb4b[_0x49f245];return _0x427f1c;},_0x49f2(_0x25e5b5,_0x4da413);}var _0x4bea0=_0x49f2;function _0x15eb(){var _0x36cbfb=['5768634HCqlkx','38edcZsi','13435670dWgrDE','2084736APXaFI','7hbiqeL','91522kmtYBW','onGetSelfTinyId','4051175ldQDaI','9732232lWZavQ','onSessionInitComplete','887712wnJnEA','9jsXTLd'];_0x15eb=function(){return _0x36cbfb;};return _0x15eb();}(function(_0x189337,_0x1e6399){var _0xd3c894=_0x49f2,_0x2f8eb8=_0x189337();while(!![]){try{var _0x1c4932=parseInt(_0xd3c894(0x132))/0x1*(parseInt(_0xd3c894(0x12e))/0x2)+parseInt(_0xd3c894(0x12b))/0x3+parseInt(_0xd3c894(0x130))/0x4+-parseInt(_0xd3c894(0x134))/0x5+-parseInt(_0xd3c894(0x12d))/0x6+parseInt(_0xd3c894(0x131))/0x7*(-parseInt(_0xd3c894(0x129))/0x8)+-parseInt(_0xd3c894(0x12c))/0x9*(-parseInt(_0xd3c894(0x12f))/0xa);if(_0x1c4932===_0x1e6399)break;else _0x2f8eb8['push'](_0x2f8eb8['shift']());}catch(_0xdb208e){_0x2f8eb8['push'](_0x2f8eb8['shift']());}}}(_0x15eb,0xde80a));export class SessionListener{['onNTSessionCreate'](_0x2ddbff){}['onGProSessionCreate'](_0x5445f7){}[_0x4bea0(0x12a)](_0x5c35b2){}['onOpentelemetryInit'](_0xcc645a){}['onUserOnlineResult'](_0xf08112){}[_0x4bea0(0x133)](_0x20814f){}}
|
@@ -1 +1 @@
|
||||
var _0x146011=_0x4155;(function(_0x5cb7d1,_0x31a60e){var _0x4b1ff8=_0x4155,_0x1dd5ca=_0x5cb7d1();while(!![]){try{var _0x333140=parseInt(_0x4b1ff8(0x1f3))/0x1*(parseInt(_0x4b1ff8(0x1f9))/0x2)+parseInt(_0x4b1ff8(0x1ec))/0x3+parseInt(_0x4b1ff8(0x1ef))/0x4+parseInt(_0x4b1ff8(0x1ee))/0x5*(parseInt(_0x4b1ff8(0x1f8))/0x6)+parseInt(_0x4b1ff8(0x1f6))/0x7*(-parseInt(_0x4b1ff8(0x1f2))/0x8)+-parseInt(_0x4b1ff8(0x1f1))/0x9*(parseInt(_0x4b1ff8(0x1f7))/0xa)+parseInt(_0x4b1ff8(0x1eb))/0xb;if(_0x333140===_0x31a60e)break;else _0x1dd5ca['push'](_0x1dd5ca['shift']());}catch(_0x41e2a8){_0x1dd5ca['push'](_0x1dd5ca['shift']());}}}(_0x1f59,0x9cdda));function _0x4155(_0x211739,_0x5c11d7){var _0x1f59de=_0x1f59();return _0x4155=function(_0x415520,_0x5c1e6b){_0x415520=_0x415520-0x1eb;var _0x5461bd=_0x1f59de[_0x415520];return _0x5461bd;},_0x4155(_0x211739,_0x5c11d7);}function _0x1f59(){var _0x562bdf=['73THkZOH','onCleanCacheProgressChanged','onScanCacheProgressChanged','120358cbXjDA','170990FgoXRz','6ZkibDy','18844jXnMMM','1858197MuqdTm','392559hWLfKf','onFinishScan','3138335HzIRVp','3036452ZDvNga','onChatCleanDone','450iHrzPP','408kdMfKF'];_0x1f59=function(){return _0x562bdf;};return _0x1f59();}export class StorageCleanListener{[_0x146011(0x1f4)](_0x2b7155){}[_0x146011(0x1f5)](_0x48ac32){}['onCleanCacheStorageChanged'](_0x20b4a6){}[_0x146011(0x1ed)](_0x200bd1){}[_0x146011(0x1f0)](_0x19457d){}}
|
||||
function _0x13a7(){var _0x27311f=['onCleanCacheProgressChanged','onCleanCacheStorageChanged','5435465ALxxTm','8045848OJnRdr','1769463gOXbPS','onFinishScan','onChatCleanDone','63184kEqgiq','1658882bxPTAH','4469160ThCbEF','4LBtkXb','onScanCacheProgressChanged','1124766ljrCMY'];_0x13a7=function(){return _0x27311f;};return _0x13a7();}function _0x269f(_0x112845,_0x8cb48){var _0x13a722=_0x13a7();return _0x269f=function(_0x269fe3,_0x5afebe){_0x269fe3=_0x269fe3-0xfa;var _0x31466d=_0x13a722[_0x269fe3];return _0x31466d;},_0x269f(_0x112845,_0x8cb48);}var _0x51d589=_0x269f;(function(_0x13261c,_0x2201e1){var _0x420dba=_0x269f,_0x2042df=_0x13261c();while(!![]){try{var _0x4df73b=-parseInt(_0x420dba(0x104))/0x1+-parseInt(_0x420dba(0x105))/0x2+parseInt(_0x420dba(0x101))/0x3*(parseInt(_0x420dba(0xfa))/0x4)+parseInt(_0x420dba(0x106))/0x5+-parseInt(_0x420dba(0xfc))/0x6+-parseInt(_0x420dba(0xff))/0x7+parseInt(_0x420dba(0x100))/0x8;if(_0x4df73b===_0x2201e1)break;else _0x2042df['push'](_0x2042df['shift']());}catch(_0x360c70){_0x2042df['push'](_0x2042df['shift']());}}}(_0x13a7,0x9a7e3));export class StorageCleanListener{[_0x51d589(0xfd)](_0x6dbd0d){}[_0x51d589(0xfb)](_0x3d2cab){}[_0x51d589(0xfe)](_0x65a335){}[_0x51d589(0x102)](_0x420f64){}[_0x51d589(0x103)](_0x4ba4b9){}}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user