Skip to content

Commit 19022d6

Browse files
committed
Merge branch 'master' into fix-wechat-at-message-parsing
# Conflicts: # astrbot/core/platform/sources/wechatpadpro/wechatpadpro_adapter.py
2 parents a9dbff7 + 58a815d commit 19022d6

26 files changed

Lines changed: 1032 additions & 132 deletions

File tree

.github/workflows/docker-image.yml

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,33 +11,52 @@ jobs:
1111
runs-on: ubuntu-latest
1212

1313
steps:
14-
- name: 拉取源码
14+
- name: Pull The Codes
1515
uses: actions/checkout@v3
1616
with:
17-
fetch-depth: 1
17+
fetch-depth: 0 # Must be 0 so we can fetch tags
1818

19-
- name: 设置 QEMU
19+
- name: Get latest tag (only on manual trigger)
20+
id: get-latest-tag
21+
if: github.event_name == 'workflow_dispatch'
22+
run: |
23+
tag=$(git describe --tags --abbrev=0)
24+
echo "latest_tag=$tag" >> $GITHUB_OUTPUT
25+
26+
- name: Checkout to latest tag (only on manual trigger)
27+
if: github.event_name == 'workflow_dispatch'
28+
run: git checkout ${{ steps.get-latest-tag.outputs.latest_tag }}
29+
30+
- name: Set QEMU
2031
uses: docker/setup-qemu-action@v3
2132

22-
- name: 设置 Docker Buildx
33+
- name: Set Docker Buildx
2334
uses: docker/setup-buildx-action@v3
2435

25-
- name: 登录到 DockerHub
36+
- name: Log in to DockerHub
2637
uses: docker/login-action@v3
2738
with:
2839
username: ${{ secrets.DOCKER_HUB_USERNAME }}
2940
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
3041

31-
- name: 构建和推送 Docker hub
42+
- name: Login to GitHub Container Registry
43+
uses: docker/login-action@v3
44+
with:
45+
registry: ghcr.io
46+
username: Soulter
47+
password: ${{ secrets.GITHUB_TOKEN }}
48+
49+
- name: Build and Push Docker to DockerHub and Github GHCR
3250
uses: docker/build-push-action@v6
3351
with:
3452
context: .
3553
platforms: linux/amd64,linux/arm64
3654
push: true
3755
tags: |
3856
${{ secrets.DOCKER_HUB_USERNAME }}/astrbot:latest
39-
${{ secrets.DOCKER_HUB_USERNAME }}/astrbot:${{ github.ref_name }}
57+
${{ secrets.DOCKER_HUB_USERNAME }}/astrbot:${{ github.event_name == 'workflow_dispatch' && steps.get-latest-tag.outputs.latest_tag || github.ref_name }}
58+
ghcr.io/soulter/astrbot:latest
59+
ghcr.io/soulter/astrbot:${{ github.event_name == 'workflow_dispatch' && steps.get-latest-tag.outputs.latest_tag || github.ref_name }}
4060
4161
- name: Post build notifications
4262
run: echo "Docker image has been built and pushed successfully"
43-

astrbot/core/config/astrbot_config.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,12 @@ def check_config_integrity(self, refer_conf: Dict, conf: Dict, path=""):
9999
has_new |= self.check_config_integrity(
100100
value, conf[key], path + "." + key if path else key
101101
)
102+
for key in list(conf.keys()):
103+
if key not in refer_conf:
104+
path_ = path + "." + key if path else key
105+
logger.info(f"检查到配置项 {path_} 不存在,将从当前配置中删除")
106+
del conf[key]
107+
has_new = True
102108
return has_new
103109

104110
def save_config(self, replace_config: Dict = None):

astrbot/core/pipeline/respond/stage.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ class RespondStage(Stage):
3232
Comp.Node: lambda comp: bool(comp.content), # 转发节点
3333
Comp.Nodes: lambda comp: bool(comp.nodes), # 多个转发节点
3434
Comp.File: lambda comp: bool(comp.file_ or comp.url),
35+
Comp.WechatEmoji: lambda comp: comp.md5 is not None, # 微信表情
3536
}
3637

3738
async def initialize(self, ctx: PipelineContext):

0 commit comments

Comments
 (0)