Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

怎样被动回复非文本信息? #2884

Closed
shaukei opened this issue Feb 11, 2025 · 3 comments · Fixed by #2891
Closed

怎样被动回复非文本信息? #2884

shaukei opened this issue Feb 11, 2025 · 3 comments · Fixed by #2891

Comments

@shaukei
Copy link

shaukei commented Feb 11, 2025

在企微应用里面发文本信息后,后端在收到处理完成,想发图文等等其他类型信息,要怎样做?现在直接return的string就是回复内容。不满足需求

@shaukei
Copy link
Author

shaukei commented Feb 11, 2025

$server->with(function ($message) {
return ‘msg’;
});

@shaukei
Copy link
Author

shaukei commented Feb 11, 2025

$server->with(function ($message) {
return [
                'MsgType' => 'image',
                'Image' => [
                    'MediaId' => $message['MediaId'],
                ],
            ];
});

解决了。

@TheNorthMemory
Copy link
Contributor

建议把探索的结果,提一个PR到这里

# 示例
> 👏🏻 欢迎点击本页下方 "帮助我们改善此页面!" 链接参与贡献更多的使用示例!
<!--
<details>
<summary>标题</summary>
内容
</details>
-->

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants