ChisBread / wechat-service

🤖Let your WeChat run as a service
GNU General Public License v3.0
375 stars 61 forks source link

自己发送给对方的消息被识别为对方发送的消息 #3

Open crazyn2 opened 1 year ago

crazyn2 commented 1 year ago
$ uname -a
Linux 5.19.0-38-generic #39~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Mar 17 21:16:15 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
$ docker inspect chisbread/wechat-service
[
    {
        "Id": "sha256:c98cf38191d7d4012b1d2a8e48e12831b8cfc367af87903b4b36e39b223bcc3e",
        "RepoTags": [
            "chisbread/wechat-service:latest"
        ],
        "RepoDigests": [
            "chisbread/wechat-service@sha256:e0598e4e02597da61aec8c5019465147926ea688e8c61a043198a4b32cfdb45c"
        ],
        "Parent": "",
        "Comment": "",
        "Created": "2022-06-06T04:45:15.217887613Z",
        "Container": "ff40c63dc137c689562eff800ec2bdfbfe9e57c47e607cf12eae01831f8dd649",
        "ContainerConfig": {
            "Hostname": "ff40c63dc137",
            "Domainname": "",
            "User": "app",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "ExposedPorts": {
                "8080/tcp": {}
            },
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                "DISPLAY_WIDTH=1280",
                "DISPLAY_HEIGHT=720",
                "DISPLAY=:0.0",
                "LANG=zh_CN.UTF-8",
                "LANGUAGE=zh_CN.UTF-8",
                "LC_ALL=zh_CN.UTF-8",
                "WINEPREFIX=/home/app/.wine"
            ],
            "Cmd": [
                "/bin/sh",
                "-c",
                "#(nop) ",
                "ENTRYPOINT [\"/inj-entrypoint.sh\"]"
            ],
            "Image": "sha256:850bf66124861bdcc7ab7f2e21d6a4c518c2fd602b662aec85c5f12d85876bed",
            "Volumes": null,
            "WorkingDir": "/home/app",
            "Entrypoint": [
                "/inj-entrypoint.sh"
            ],
            "OnBuild": null,
            "Labels": {}
        },
        "DockerVersion": "20.10.15",
        "Author": "",
        "Config": {
            "Hostname": "",
            "Domainname": "",
            "User": "app",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "ExposedPorts": {
                "8080/tcp": {}
            },
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                "DISPLAY_WIDTH=1280",
                "DISPLAY_HEIGHT=720",
                "DISPLAY=:0.0",
                "LANG=zh_CN.UTF-8",
                "LANGUAGE=zh_CN.UTF-8",
                "LC_ALL=zh_CN.UTF-8",
                "WINEPREFIX=/home/app/.wine"
            ],
            "Cmd": null,
            "Image": "sha256:850bf66124861bdcc7ab7f2e21d6a4c518c2fd602b662aec85c5f12d85876bed",
            "Volumes": null,
            "WorkingDir": "/home/app",
            "Entrypoint": [
                "/inj-entrypoint.sh"
            ],
            "OnBuild": null,
            "Labels": null
        },
        "Architecture": "amd64",
        "Os": "linux",
        "Size": 5367328074,
        "VirtualSize": 5367328074,
        "GraphDriver": {
            "Data": {
                "LowerDir": "/home/zby/etnd/docker/overlay2/23af7f954246b3ce7967bbb82fb9ddccb1d913f8510d7b0d384354096610da81/diff:/home/zby/etnd/docker/overlay2/c744437597efc19704672739146ab63ee74e379a570b48ab06aac57e88464666/diff:/home/zby/etnd/docker/overlay2/5d7265cddae52f3dccb623b855a0c568e88dff84ba6d886fbfad64295612a914/diff:/home/zby/etnd/docker/overlay2/8de66000a6613f4c648824b3151de5e55fd498322f3ff943b22cb74cbcd5791b/diff:/home/zby/etnd/docker/overlay2/7a9de154129a60ffae089efa92c070b189764b517fff5ae7c98f8e0a803833e2/diff:/home/zby/etnd/docker/overlay2/2d08c6de04cf18128d0632a1384646d7960f2a033099ef7cb814a1973c0b4756/diff:/home/zby/etnd/docker/overlay2/c5d19511b0a5c01753156901de028af3b2704eb4dbae79063db003498f44ae37/diff:/home/zby/etnd/docker/overlay2/6ab5773c6ba944dea4080599db903f0fc52f3381332c6d552b7c5464164fe566/diff:/home/zby/etnd/docker/overlay2/7fbd5dd140dc6ca5ca94c4dcd040ee58675b74ce4a701e153e8d66afaffa99de/diff:/home/zby/etnd/docker/overlay2/7e8d1920df2561426acaf17b8944d65226db320540639d0fbdb77bd1ca8f22c3/diff:/home/zby/etnd/docker/overlay2/f342e6336186fc18ffcd970a9dd2246b45c02f34765e20a3bb6c4fc39041ce79/diff",
                "MergedDir": "/home/zby/etnd/docker/overlay2/6f543041e019fd000d0df5eb1a756966e2163aebc1a6a51609194fe24b59584b/merged",
                "UpperDir": "/home/zby/etnd/docker/overlay2/6f543041e019fd000d0df5eb1a756966e2163aebc1a6a51609194fe24b59584b/diff",
                "WorkDir": "/home/zby/etnd/docker/overlay2/6f543041e019fd000d0df5eb1a756966e2163aebc1a6a51609194fe24b59584b/work"
            },
            "Name": "overlay2"
        },
        "RootFS": {
            "Type": "layers",
            "Layers": [
                "sha256:78658088978a7596a65f6e864cd30ae00697c62b2b0b82ebf766239ae9c2ed6d",
                "sha256:accb6e2d681298d8e9c82d7c954f87d9b0147799d48935b1505f95d0433a4527",
                "sha256:2f8767ec2785c0ddf859c9e8609b22f076b24846eae43d1b2f0b978635696c06",
                "sha256:ea2e5a084e30f7b660444743088d544904ec3d20671381d183c7c09f39c081a6",
                "sha256:8b26ab852d8abd068a5c03238169e919b8a7e5e1152224de5f750efb70744ac3",
                "sha256:f8af71e853f71c9660e830ebb355ca25f68c91671635d9ccc502d1f23024d147",
                "sha256:6b9192c28285c8e5b7891de8583892ff3e3e74b8ec64eda75d7d34155ceb58bc",
                "sha256:26f6e1b89f4d3602d5d80fabd2cb77737ac42e5a06145c59421e326f1ed209e2",
                "sha256:f28df6da17153eb6d2171cd6715ac61ba56b10e945e55ea5c77dffbc7399ce24",
                "sha256:cfb361b7d0ab3b880d7468be705926cdcb0a8fc305657e3cd6ff617fae1b142e",
                "sha256:f8ee8ef18a5280e30e836d11af2fd9b2a9429a7377a085fa00e2a929ab3f4b05",
                "sha256:6da703552163ca22502b81a0d69dba85f509a9b49dbaed75e0c3ff378053ec12"
            ]
        },
        "Metadata": {
            "LastTagTime": "0001-01-01T00:00:00Z"
        }
    }
]
# query: 你会思考吗? reply: 我会思考
# query: /sh.exec echo '好玩' reply: 好玩
python3 minibot.py example-config.yaml chatbot

[2023-04-18 22:53:44]:收到消息:{'content': '你好', 'id': '20230418145344', 'id1': '', 'id2': '', 'id3': '', 'srvid': 1, 'time': '2023-04-18 14:53:44', 'type': 1, 'wxid': 'wxid_7hn22', 'roomid': None, 'senderid': wxid_7hn22', 'nickname': 'chatbot'}
# 上述消息是我发送给chatbot的,也被识别对方发送的了,手机端发送的,电脑端是没问题的