From 06461960a93da80ffd4a4e73ae52068d5fdc6ec6 Mon Sep 17 00:00:00 2001 From: PSoul Date: Tue, 1 Aug 2023 08:53:37 +0800 Subject: [PATCH 1/8] fix: group not found report (#2312) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 解决以下问题: 当群组踢人时,该人不在群内,返回“群聊不存在”的BUG https://github.com/Mrs4s/go-cqhttp/issues/1774#issue-1459854639 --- coolq/api.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/coolq/api.go b/coolq/api.go index a1e6fc0..39815e2 100644 --- a/coolq/api.go +++ b/coolq/api.go @@ -1149,7 +1149,9 @@ func (bot *CQBot) CQDelGroupMemo(groupID int64, fid string) global.MSG { // @rename(msg->message, block->reject_add_request) func (bot *CQBot) CQSetGroupKick(groupID int64, userID int64, msg string, block bool) global.MSG { if g := bot.Client.FindGroup(groupID); g != nil { - if m := g.FindMember(userID); m != nil { + if m := g.FindMember(userID); m == nil { + return Failed(100, "MEMBER_IS_NOT_IN_GROUP", "人员不存在") + } else { err := m.Kick(msg, block) if err != nil { return Failed(100, "NOT_MANAGEABLE", "机器人权限不足") From 998fda54a2ad0187b60faad3fa47e10aa177480c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=AE=80=E5=BE=8B=E7=BA=AF?= Date: Tue, 1 Aug 2023 11:17:29 +0800 Subject: [PATCH 2/8] Update bug-report.yaml (#2234) --- .github/ISSUE_TEMPLATE/bug-report.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/ISSUE_TEMPLATE/bug-report.yaml b/.github/ISSUE_TEMPLATE/bug-report.yaml index 9849493..1f468c2 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.yaml +++ b/.github/ISSUE_TEMPLATE/bug-report.yaml @@ -106,6 +106,8 @@ body: - 2 | Android Watch - 3 | MacOS - 4 | 企点 + - 5 | iPad + - 6 |aPad validations: required: true From 09ab2169d9da0817e51fb212edc4822e17cd2cf2 Mon Sep 17 00:00:00 2001 From: LY <1334850101@qq.com> Date: Tue, 1 Aug 2023 11:21:49 +0800 Subject: [PATCH 3/8] =?UTF-8?q?=E6=9B=B4=E6=96=B0docker=20action,=20?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E6=9B=B4=E5=A4=9A=E7=9A=84=E5=B9=B3=E5=8F=B0?= =?UTF-8?q?=20(#2217)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update build_docker_image.yml * Update docker-entrypoint.sh * Update build_docker_image.yml * ✨ update docker action, more platforms are supported --------- Co-authored-by: xiwangly2 <1334850101@qq.om> Co-authored-by: 源文雨 <41315874+fumiama@users.noreply.github.com> --- .github/workflows/build_docker_image.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build_docker_image.yml b/.github/workflows/build_docker_image.yml index c5096e0..44ae4a2 100644 --- a/.github/workflows/build_docker_image.yml +++ b/.github/workflows/build_docker_image.yml @@ -77,3 +77,4 @@ jobs: labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha cache-to: type=gha,mode=max + platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/ppc64le,linux/s390x From 99e5cb6c6b5eacc7b4bb624aaa0f55a4a4459587 Mon Sep 17 00:00:00 2001 From: Antonia Adams <10476982+li-xunhuan@users.noreply.github.com> Date: Tue, 1 Aug 2023 11:22:12 +0800 Subject: [PATCH 4/8] =?UTF-8?q?:bug:=20=E4=BF=AE=E5=A4=8D=E6=97=B6?= =?UTF-8?q?=E5=8C=BA=E4=B8=8D=E6=98=AF=E4=B8=9C=E5=85=AB=E5=8C=BA=E7=9A=84?= =?UTF-8?q?=20BUG=20(#2212)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 设置 TZ 环境变量需要先装`tzdata`这个包才会生效 --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 51330ed..f79bc61 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,7 +21,8 @@ RUN chmod +x /docker-entrypoint.sh && \ ffmpeg \ coreutils \ shadow \ - su-exec && \ + su-exec \ + tzdata && \ rm -rf /var/cache/apk/* && \ mkdir -p /app && \ mkdir -p /data && \ From 1911b5d245314aea8291cc50eea1ba80371b3a57 Mon Sep 17 00:00:00 2001 From: Akirami <66513481+A-kirami@users.noreply.github.com> Date: Tue, 1 Aug 2023 11:26:58 +0800 Subject: [PATCH 5/8] Update bug-report.yaml (#2126) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: 源文雨 <41315874+fumiama@users.noreply.github.com> --- .github/ISSUE_TEMPLATE/bug-report.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug-report.yaml b/.github/ISSUE_TEMPLATE/bug-report.yaml index 1f468c2..7d9a30b 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.yaml +++ b/.github/ISSUE_TEMPLATE/bug-report.yaml @@ -101,13 +101,13 @@ body: label: 使用协议 description: 选择使用的协议 options: - - 0 | iPad + - 0 | Default - 1 | Android Phone - 2 | Android Watch - 3 | MacOS - 4 | 企点 - - 5 | iPad - - 6 |aPad + - 5 | iPad + - 6 | aPad validations: required: true From 3992dd40c5a31cfc0b2f9d4862fd91932b020869 Mon Sep 17 00:00:00 2001 From: Nanahira <78877@qq.com> Date: Tue, 1 Aug 2023 11:44:49 +0800 Subject: [PATCH 6/8] Docker: support continuous params on CMD option (#1829) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit now it supports usage like `docker run -it --rm go-cqhttp -faststart` Co-authored-by: 源文雨 <41315874+fumiama@users.noreply.github.com> --- docker-entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 34c5e72..79f62f0 100644 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -17,4 +17,4 @@ chown -R ${UID}:${GID} /app /data chmod +x /app/cqhttp echo "Starting..." -su-exec ${USER} "$@" +su-exec ${USER} /app/cqhttp "$@" From 99cdf9247ae9645dbbebcb3bf36e2bc8fc74dc6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BA=90=E6=96=87=E9=9B=A8?= <41315874+fumiama@users.noreply.github.com> Date: Tue, 1 Aug 2023 12:32:29 +0800 Subject: [PATCH 7/8] make lint happy --- coolq/api.go | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/coolq/api.go b/coolq/api.go index 4dd2fd2..1f18ad1 100644 --- a/coolq/api.go +++ b/coolq/api.go @@ -1118,13 +1118,12 @@ func (bot *CQBot) CQSetGroupMemo(groupID int64, msg, img string) global.MSG { return Failed(100, "SEND_NOTICE_ERROR", err.Error()) } return OK(global.MSG{"notice_id": noticeID}) - } else { - noticeID, err := bot.Client.AddGroupNoticeSimple(groupID, msg) - if err != nil { - return Failed(100, "SEND_NOTICE_ERROR", err.Error()) - } - return OK(global.MSG{"notice_id": noticeID}) } + noticeID, err := bot.Client.AddGroupNoticeSimple(groupID, msg) + if err != nil { + return Failed(100, "SEND_NOTICE_ERROR", err.Error()) + } + return OK(global.MSG{"notice_id": noticeID}) } return Failed(100, "GROUP_NOT_FOUND", "群聊不存在") } From a6fd7de65a062cb8a3112dca4b3cdbca822c020b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BA=90=E6=96=87=E9=9B=A8?= <41315874+fumiama@users.noreply.github.com> Date: Tue, 1 Aug 2023 12:34:59 +0800 Subject: [PATCH 8/8] sync: master to dev (#2340) (#2341) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: group not found report (#2312) 解决以下问题: 当群组踢人时,该人不在群内,返回“群聊不存在”的BUG https://github.com/Mrs4s/go-cqhttp/issues/1774#issue-1459854639 * Update bug-report.yaml (#2234) * 更新docker action, 支持更多的平台 (#2217) * Update build_docker_image.yml * Update docker-entrypoint.sh * Update build_docker_image.yml * ✨ update docker action, more platforms are supported --------- * :bug: 修复时区不是东八区的 BUG (#2212) 设置 TZ 环境变量需要先装`tzdata`这个包才会生效 * Update bug-report.yaml (#2126) * Docker: support continuous params on CMD option (#1829) now it supports usage like `docker run -it --rm go-cqhttp -faststart` * make lint happy --------- Co-authored-by: PSoul Co-authored-by: 简律纯 Co-authored-by: LY <1334850101@qq.com> Co-authored-by: xiwangly2 <1334850101@qq.om> Co-authored-by: Antonia Adams <10476982+li-xunhuan@users.noreply.github.com> Co-authored-by: Akirami <66513481+A-kirami@users.noreply.github.com> Co-authored-by: Nanahira <78877@qq.com>