Skip to content
This repository has been archived by the owner on Nov 2, 2023. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: takayama-lily/oicq
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.12.5
Choose a base ref
...
head repository: takayama-lily/oicq
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Loading
Showing with 12,506 additions and 7,295 deletions.
  1. +42 −0 .eslintrc.js
  2. +35 −0 .github/ISSUE_TEMPLATE/1-bug-report.yml
  3. +5 −0 .github/ISSUE_TEMPLATE/config.yml
  4. +17 −0 .github/workflows/ci.yml
  5. +71 −0 .github/workflows/codeql-analysis.yml
  6. +1 −1 .gitignore
  7. +372 −201 LICENSE
  8. +52 −37 README.md
  9. +13 −0 awesome.md
  10. +2 −0 bin/oicq
  11. +0 −619 client.d.ts
  12. +0 −753 client.js
  13. +0 −168 device.js
  14. +0 −169 docs/api.md
  15. +0 −66 docs/demo.js
  16. +0 −266 docs/event.md
  17. +0 −41 docs/msgid.md
  18. +0 −103 docs/project.md
  19. +22 −0 error-code.md
  20. +187 −0 http-api/README.md
  21. +217 −0 http-api/api.js
  22. +44 −0 http-api/config.sample.js
  23. +480 −0 http-api/core.js
  24. +39 −0 http-api/cq-notice.js
  25. +128 −0 http-api/filter.js
  26. +39 −0 http-api/index.js
  27. +1,214 −0 index.d.ts
  28. +34 −0 index.js
  29. +63 −0 lib/algo/jce/index.js
  30. +341 −0 lib/algo/jce/jce.js
  31. +159 −0 lib/algo/pb.js
  32. +8 −0 lib/algo/protobuf.min.js
  33. +121 −0 lib/algo/tea.js
  34. +312 −0 lib/client-ext.js
  35. +147 −0 lib/client-net.js
  36. +594 −0 lib/client.js
  37. +160 −40 lib/common.js
  38. +0 −301 lib/core.js
  39. +415 −0 lib/core/friendlist.js
  40. +148 −0 lib/core/nessy.js
  41. +1 −0 lib/core/ref.d.ts
  42. +388 −0 lib/core/sysmsg.js
  43. +586 −0 lib/core/troop.js
  44. +181 −0 lib/device.js
  45. +16 −10 { → lib}/exception.js
  46. +0 −429 lib/friendlist.js
  47. +0 −284 lib/individual.js
  48. +0 −60 lib/jce.js
  49. +705 −399 lib/message/builder.js
  50. +177 −385 lib/message/chat.js
  51. +226 −2 lib/message/face.js
  52. +396 −22 lib/message/file.js
  53. +45 −29 lib/message/history.js
  54. +256 −95 lib/message/image.js
  55. +241 −0 lib/message/multi.js
  56. +85 −19 lib/message/music.js
  57. +678 −224 lib/message/parser.js
  58. +389 −0 lib/message/ptt.js
  59. +0 −176 lib/message/recv.js
  60. +427 −0 lib/oicq.js
  61. +0 −469 lib/online-push.js
  62. +616 −0 lib/onlinepush.js
  63. +0 −132 lib/pb.js
  64. +97 −43 lib/ref.d.ts
  65. +165 −152 lib/service.js
  66. +0 −233 lib/sysmsg.js
  67. +0 −342 lib/troop.js
  68. +10 −12 lib/wtlogin/ecdh.js
  69. +215 −0 lib/wtlogin/login-password.js
  70. +249 −0 lib/wtlogin/login-qrcode.js
  71. +130 −58 lib/wtlogin/tlv.js
  72. +0 −3 lib/wtlogin/writer.js
  73. +379 −568 lib/wtlogin/wt.js
  74. +0 −230 package-lock.json
  75. +42 −20 package.json
  76. +0 −134 test.js
  77. +72 −0 test/algo.js
  78. +3 −0 test/benchmark/index.js
  79. +64 −0 test/benchmark/perf_test_pb.js
  80. +36 −0 test/benchmark/perf_test_tea.js
  81. +115 −0 util.js
  82. +34 −0 web-api.md
42 changes: 42 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
module.exports = {
"env": {
"commonjs": true,
"es2021": true,
"node": true
},
"extends": "eslint:recommended",
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 12
},
"rules": {
"indent": [
"warn",
4
],
"linebreak-style": [
"error",
"unix"
],
"quotes": [
"warn",
"double"
],
"semi": [
"warn",
"always"
],
"no-empty": [
"warn",
{ "allowEmptyCatch": true }
],
"no-unused-vars": "warn",
"no-redeclare": "warn",
"no-constant-condition": "warn",
"no-useless-escape": "warn",
"no-case-declarations": "warn",
},
"standard": {
"env": [ "mocha" ]
}
};
35 changes: 35 additions & 0 deletions .github/ISSUE_TEMPLATE/1-bug-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Bug Report
description: Bug Report
body:
- type: markdown
attributes:
value: |
请提供以下信息
- type: input
attributes:
label: Node.js Version
description: Output of `node -v`
- type: input
attributes:
label: Package Version
description: Installed by npm or yarn
placeholder: latest?
- type: dropdown
attributes:
label: Login Protocol
options:
- Android
- aPad
- Watch
- iMac
- iPad
- type: markdown
attributes:
value: |
* [x] 我已确认过官方客户端不存在此问题,库的行为存在问题。
- type: textarea
attributes:
label: Bug Description
- type: textarea
attributes:
label: Log Details
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: true
contact_links:
- name: 查看wiki
url: https://github.com/takayama-lily/oicq/wiki
about: 获取常见问题的解答,以及详细的Api文档
17 changes: 17 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: CI

on:
pull_request:
push:
branches:
- master

jobs:
build:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: npm install
- run: npm run mocha
- run: npm run bench
71 changes: 71 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ master ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
schedule:
- cron: '22 0 * * 6'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed

steps:
- name: Checkout repository
uses: actions/checkout@v2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
node_modules
.vscode
data
data
Loading