From 8ea182a4c34b5301a09e7f7560432320d27d32f8 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:51 +0800 Subject: [PATCH] sync: master to dev (#2340) 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 --------- Co-authored-by: xiwangly2 <1334850101@qq.om> Co-authored-by: 源文雨 <41315874+fumiama@users.noreply.github.com> * :bug: 修复时区不是东八区的 BUG (#2212) 设置 TZ 环境变量需要先装`tzdata`这个包才会生效 * Update bug-report.yaml (#2126) Co-authored-by: 源文雨 <41315874+fumiama@users.noreply.github.com> * Docker: support continuous params on CMD option (#1829) now it supports usage like `docker run -it --rm go-cqhttp -faststart` Co-authored-by: 源文雨 <41315874+fumiama@users.noreply.github.com> * 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> --- .github/ISSUE_TEMPLATE/bug-report.yaml | 4 +++- .github/workflows/build_docker_image.yml | 1 + Dockerfile | 3 ++- coolq/api.go | 11 +++++------ docker-entrypoint.sh | 2 +- 5 files changed, 12 insertions(+), 9 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug-report.yaml b/.github/ISSUE_TEMPLATE/bug-report.yaml index 9849493..7d9a30b 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.yaml +++ b/.github/ISSUE_TEMPLATE/bug-report.yaml @@ -101,11 +101,13 @@ body: label: 使用协议 description: 选择使用的协议 options: - - 0 | iPad + - 0 | Default - 1 | Android Phone - 2 | Android Watch - 3 | MacOS - 4 | 企点 + - 5 | iPad + - 6 | aPad validations: required: true 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 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 && \ 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", "群聊不存在") } 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 "$@"