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

飞书接口在飞书卡片中@用户的方法有个坑 #145

Open
kennywgx opened this issue Sep 19, 2024 · 1 comment
Open

飞书接口在飞书卡片中@用户的方法有个坑 #145

kennywgx opened this issue Sep 19, 2024 · 1 comment

Comments

@kennywgx
Copy link

官方文档给出的示例有错误:
image
card字段应该改为content

另外,飞书消息和飞书卡片中@用户的方式是有区别的:

飞书消息:

<at user_id="xxxx"/>

飞书卡片:

<at id="xxxx"/>

飞书富文本(我没试过):

{
      "tag": "at",
      "user_id": "xxxx"
}

而在sdk中只找到1中方式:

        // com.lark.oapi.service.im.v1.model.ext.MessageText.java
        public Builder atUser(String userId, String name) {
            sb.append("<at user_id=\\\"")
                    .append(userId)
                    .append("\\\">")
                    .append(name)
                    .append("</at>");
            return this;
        }

希望可以增加对其他方式的支持,或者能说明清楚~ 我尝试了好久一直在使用错误的字段=。=

@Alexro0t
Copy link

这个请求体折磨了我三天的时间才试出来,全靠猜

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

No branches or pull requests

2 participants