Skip to content

Commit

Permalink
User CQHTTP User-Agent. Closes #12
Browse files Browse the repository at this point in the history
  • Loading branch information
yyuueexxiinngg committed Aug 2, 2020
1 parent be48a89 commit 51640a5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ class ReportService(
val res = http.request<String?> {
url(url)
headers {
append("User-Agent", "MiraiHttp/0.1.0")
append("User-Agent", "CQHttp/4.15.0")
append("X-Self-ID", botId.toString())
secret.takeIf { it != "" }?.apply {
append("X-Signature", getSha1Hash(botId, json))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class WebSocketReverseClient(
port = config.reversePort,
path = config.reversePath,
request = {
header("User-Agent", "MiraiHttp/${PluginBase.description.version}")
header("User-Agent", "CQHttp/4.15.0")
header("X-Self-ID", bot.id.toString())
header("X-Client-Role", "Universal")
config.accessToken?.let {
Expand Down

0 comments on commit 51640a5

Please sign in to comment.