Files
DevFlow/docs/02-架构设计/专项设计/.research/issue-130-comments.json
T

1 line
20 KiB
JSON

[{"url":"https://api.github.com/repos/larksuite/oapi-sdk-go/issues/comments/2014454577","html_url":"https://github.com/larksuite/oapi-sdk-go/issues/130#issuecomment-2014454577","issue_url":"https://api.github.com/repos/larksuite/oapi-sdk-go/issues/130","id":2014454577,"node_id":"IC_kwDOEiHOJs54EiMx","user":{"login":"maemual","id":2352843,"node_id":"MDQ6VXNlcjIzNTI4NDM=","avatar_url":"https://avatars.githubusercontent.com/u/2352843?v=4","gravatar_id":"","url":"https://api.github.com/users/maemual","html_url":"https://github.com/maemual","followers_url":"https://api.github.com/users/maemual/followers","following_url":"https://api.github.com/users/maemual/following{/other_user}","gists_url":"https://api.github.com/users/maemual/gists{/gist_id}","starred_url":"https://api.github.com/users/maemual/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maemual/subscriptions","organizations_url":"https://api.github.com/users/maemual/orgs","repos_url":"https://api.github.com/users/maemual/repos","events_url":"https://api.github.com/users/maemual/events{/privacy}","received_events_url":"https://api.github.com/users/maemual/received_events","type":"User","user_view_type":"public","site_admin":false},"created_at":"2024-03-22T06:42:29Z","updated_at":"2024-03-22T06:42:53Z","body":"近期卡片新特性较多,人力比较紧张,还在推进中。\r\n可以继续使用旧版的卡片回传交互使用。","author_association":"COLLABORATOR","pin":null,"reactions":{"url":"https://api.github.com/repos/larksuite/oapi-sdk-go/issues/comments/2014454577/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"performed_via_github_app":null,"minimized":null},{"url":"https://api.github.com/repos/larksuite/oapi-sdk-go/issues/comments/2181853241","html_url":"https://github.com/larksuite/oapi-sdk-go/issues/130#issuecomment-2181853241","issue_url":"https://api.github.com/repos/larksuite/oapi-sdk-go/issues/130","id":2181853241,"node_id":"IC_kwDOEiHOJs6CDHA5","user":{"login":"Martin2877","id":26109420,"node_id":"MDQ6VXNlcjI2MTA5NDIw","avatar_url":"https://avatars.githubusercontent.com/u/26109420?v=4","gravatar_id":"","url":"https://api.github.com/users/Martin2877","html_url":"https://github.com/Martin2877","followers_url":"https://api.github.com/users/Martin2877/followers","following_url":"https://api.github.com/users/Martin2877/following{/other_user}","gists_url":"https://api.github.com/users/Martin2877/gists{/gist_id}","starred_url":"https://api.github.com/users/Martin2877/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Martin2877/subscriptions","organizations_url":"https://api.github.com/users/Martin2877/orgs","repos_url":"https://api.github.com/users/Martin2877/repos","events_url":"https://api.github.com/users/Martin2877/events{/privacy}","received_events_url":"https://api.github.com/users/Martin2877/received_events","type":"User","user_view_type":"public","site_admin":false},"created_at":"2024-06-21T02:13:35Z","updated_at":"2024-06-21T02:13:53Z","body":"\r\n卡片回调一直报这个错误 `json: cannot unmarshal string into Go struct field CardAction.Header of type []string]`","author_association":"NONE","pin":null,"reactions":{"url":"https://api.github.com/repos/larksuite/oapi-sdk-go/issues/comments/2181853241/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"performed_via_github_app":null,"minimized":null},{"url":"https://api.github.com/repos/larksuite/oapi-sdk-go/issues/comments/2260564811","html_url":"https://github.com/larksuite/oapi-sdk-go/issues/130#issuecomment-2260564811","issue_url":"https://api.github.com/repos/larksuite/oapi-sdk-go/issues/130","id":2260564811,"node_id":"IC_kwDOEiHOJs6GvXtL","user":{"login":"sbaby1997","id":169505350,"node_id":"U_kgDOChpyRg","avatar_url":"https://avatars.githubusercontent.com/u/169505350?v=4","gravatar_id":"","url":"https://api.github.com/users/sbaby1997","html_url":"https://github.com/sbaby1997","followers_url":"https://api.github.com/users/sbaby1997/followers","following_url":"https://api.github.com/users/sbaby1997/following{/other_user}","gists_url":"https://api.github.com/users/sbaby1997/gists{/gist_id}","starred_url":"https://api.github.com/users/sbaby1997/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbaby1997/subscriptions","organizations_url":"https://api.github.com/users/sbaby1997/orgs","repos_url":"https://api.github.com/users/sbaby1997/repos","events_url":"https://api.github.com/users/sbaby1997/events{/privacy}","received_events_url":"https://api.github.com/users/sbaby1997/received_events","type":"User","user_view_type":"public","site_admin":false},"created_at":"2024-07-31T13:45:20Z","updated_at":"2024-07-31T13:45:20Z","body":"这个问题非常影响使用呀!","author_association":"NONE","pin":null,"reactions":{"url":"https://api.github.com/repos/larksuite/oapi-sdk-go/issues/comments/2260564811/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"performed_via_github_app":null,"minimized":null},{"url":"https://api.github.com/repos/larksuite/oapi-sdk-go/issues/comments/2260581938","html_url":"https://github.com/larksuite/oapi-sdk-go/issues/130#issuecomment-2260581938","issue_url":"https://api.github.com/repos/larksuite/oapi-sdk-go/issues/130","id":2260581938,"node_id":"IC_kwDOEiHOJs6Gvb4y","user":{"login":"maemual","id":2352843,"node_id":"MDQ6VXNlcjIzNTI4NDM=","avatar_url":"https://avatars.githubusercontent.com/u/2352843?v=4","gravatar_id":"","url":"https://api.github.com/users/maemual","html_url":"https://github.com/maemual","followers_url":"https://api.github.com/users/maemual/followers","following_url":"https://api.github.com/users/maemual/following{/other_user}","gists_url":"https://api.github.com/users/maemual/gists{/gist_id}","starred_url":"https://api.github.com/users/maemual/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maemual/subscriptions","organizations_url":"https://api.github.com/users/maemual/orgs","repos_url":"https://api.github.com/users/maemual/repos","events_url":"https://api.github.com/users/maemual/events{/privacy}","received_events_url":"https://api.github.com/users/maemual/received_events","type":"User","user_view_type":"public","site_admin":false},"created_at":"2024-07-31T13:53:03Z","updated_at":"2024-07-31T13:53:03Z","body":"@sbaby1997 升级最新版 v3.3.0,然后卡片回传交互选“卡片回传交互(旧)”","author_association":"COLLABORATOR","pin":null,"reactions":{"url":"https://api.github.com/repos/larksuite/oapi-sdk-go/issues/comments/2260581938/reactions","total_count":1,"+1":1,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"performed_via_github_app":null,"minimized":null},{"url":"https://api.github.com/repos/larksuite/oapi-sdk-go/issues/comments/2264346828","html_url":"https://github.com/larksuite/oapi-sdk-go/issues/130#issuecomment-2264346828","issue_url":"https://api.github.com/repos/larksuite/oapi-sdk-go/issues/130","id":2264346828,"node_id":"IC_kwDOEiHOJs6G9zDM","user":{"login":"Martin2877","id":26109420,"node_id":"MDQ6VXNlcjI2MTA5NDIw","avatar_url":"https://avatars.githubusercontent.com/u/26109420?v=4","gravatar_id":"","url":"https://api.github.com/users/Martin2877","html_url":"https://github.com/Martin2877","followers_url":"https://api.github.com/users/Martin2877/followers","following_url":"https://api.github.com/users/Martin2877/following{/other_user}","gists_url":"https://api.github.com/users/Martin2877/gists{/gist_id}","starred_url":"https://api.github.com/users/Martin2877/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Martin2877/subscriptions","organizations_url":"https://api.github.com/users/Martin2877/orgs","repos_url":"https://api.github.com/users/Martin2877/repos","events_url":"https://api.github.com/users/Martin2877/events{/privacy}","received_events_url":"https://api.github.com/users/Martin2877/received_events","type":"User","user_view_type":"public","site_admin":false},"created_at":"2024-08-02T01:54:18Z","updated_at":"2024-08-02T01:55:12Z","body":"All right. 鉴于官方还没修,我这里提出一个临时解决方法,大家可以参考:\r\n\r\n在 `package larkcard` 文件中\r\n\r\n1. 修改 `model.go` 中的 `CardAction`\r\n\r\n```go\r\ntype CardAction struct {\r\n\t*larkevent.EventReq\r\n\tSchema string `json:\"schema\"`\r\n\tHeader struct {\r\n\t\tEventID string `json:\"event_id\"`\r\n\t\tToken string `json:\"token\"`\r\n\t\tCreateTime string `json:\"create_time\"`\r\n\t\tEventType string `json:\"event_type\"`\r\n\t\tTenantKey string `json:\"tenant_key\"`\r\n\t\tAppID string `json:\"app_id\"`\r\n\t} `json:\"header\"`\r\n\r\n\tChallenge string `json:\"challenge\"`\r\n\tToken string `json:\"token\"`\r\n\tType string `json:\"type\"`\r\n\r\n\tEvent struct {\r\n\t\tOperator struct {\r\n\t\t\tTenantKey string `json:\"tenant_key\"`\r\n\t\t\tUserID string `json:\"user_id\"`\r\n\t\t\tOpenID string `json:\"open_id\"`\r\n\t\t\tUnionID string `json:\"union_id\"`\r\n\t\t} `json:\"operator\"`\r\n\t\tToken string `json:\"token\"`\r\n\t\tAction struct {\r\n\t\t\tTag string `json:\"tag\"`\r\n\t\t\tTimezone string `json:\"timezone\"`\r\n\t\t\tFormValue map[string]string `json:\"form_value\"`\r\n\t\t\tName string `json:\"name\"`\r\n\t\t} `json:\"action\"`\r\n\t\tHost string `json:\"host\"`\r\n\t\tContext struct {\r\n\t\t\tOpenMessageID string `json:\"open_message_id\"`\r\n\t\t\tOpenChatID string `json:\"open_chat_id\"`\r\n\t\t} `json:\"context\"`\r\n\t} `json:\"event\"`\r\n}\r\n```\r\n2. 修改`card.go`中的 `VerifySign`方法,使用 eventEncryptKey\r\n\r\n```go\r\n\tif h.eventEncryptKey == \"\" {\r\n return nil\r\n }\r\n\r\n...\r\n\r\n targetSign := Signature(requestTimestamp, requestNonce,h.eventEncryptKey,string(req.Body))\r\n```\r\n\r\n3. 修改`card.go`中的 `Signature` 方法,使用 sha256加密\r\n```go\r\n\th := sha256.New()\r\n```","author_association":"NONE","pin":null,"reactions":{"url":"https://api.github.com/repos/larksuite/oapi-sdk-go/issues/comments/2264346828/reactions","total_count":2,"+1":2,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"performed_via_github_app":null,"minimized":null},{"url":"https://api.github.com/repos/larksuite/oapi-sdk-go/issues/comments/2350798023","html_url":"https://github.com/larksuite/oapi-sdk-go/issues/130#issuecomment-2350798023","issue_url":"https://api.github.com/repos/larksuite/oapi-sdk-go/issues/130","id":2350798023,"node_id":"IC_kwDOEiHOJs6MHlTH","user":{"login":"crazykun","id":5958797,"node_id":"MDQ6VXNlcjU5NTg3OTc=","avatar_url":"https://avatars.githubusercontent.com/u/5958797?v=4","gravatar_id":"","url":"https://api.github.com/users/crazykun","html_url":"https://github.com/crazykun","followers_url":"https://api.github.com/users/crazykun/followers","following_url":"https://api.github.com/users/crazykun/following{/other_user}","gists_url":"https://api.github.com/users/crazykun/gists{/gist_id}","starred_url":"https://api.github.com/users/crazykun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crazykun/subscriptions","organizations_url":"https://api.github.com/users/crazykun/orgs","repos_url":"https://api.github.com/users/crazykun/repos","events_url":"https://api.github.com/users/crazykun/events{/privacy}","received_events_url":"https://api.github.com/users/crazykun/received_events","type":"User","user_view_type":"public","site_admin":false},"created_at":"2024-09-14T02:43:54Z","updated_at":"2024-09-14T02:43:54Z","body":"新的改成event事件承载了\r\n[v3代码示例](https://github.com/larksuite/oapi-sdk-go/blob/v3_main/sample/event/event.go#L171)\r\n```\r\n.OnP2CardActionTrigger(func(ctx context.Context, event *callback.CardActionTriggerEvent) (*callback.CardActionTriggerReponse, error) {\r\n\t\tfmt.Println(\"receive card action\")\r\n\t\tfmt.Println(larkcore.Prettify(event))\r\n\t\treturn nil, nil\r\n\t})\r\n```","author_association":"NONE","pin":null,"reactions":{"url":"https://api.github.com/repos/larksuite/oapi-sdk-go/issues/comments/2350798023/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"performed_via_github_app":null,"minimized":null},{"url":"https://api.github.com/repos/larksuite/oapi-sdk-go/issues/comments/2609615802","html_url":"https://github.com/larksuite/oapi-sdk-go/issues/130#issuecomment-2609615802","issue_url":"https://api.github.com/repos/larksuite/oapi-sdk-go/issues/130","id":2609615802,"node_id":"IC_kwDOEiHOJs6bi5O6","user":{"login":"kj648","id":15335697,"node_id":"MDQ6VXNlcjE1MzM1Njk3","avatar_url":"https://avatars.githubusercontent.com/u/15335697?v=4","gravatar_id":"","url":"https://api.github.com/users/kj648","html_url":"https://github.com/kj648","followers_url":"https://api.github.com/users/kj648/followers","following_url":"https://api.github.com/users/kj648/following{/other_user}","gists_url":"https://api.github.com/users/kj648/gists{/gist_id}","starred_url":"https://api.github.com/users/kj648/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kj648/subscriptions","organizations_url":"https://api.github.com/users/kj648/orgs","repos_url":"https://api.github.com/users/kj648/repos","events_url":"https://api.github.com/users/kj648/events{/privacy}","received_events_url":"https://api.github.com/users/kj648/received_events","type":"User","user_view_type":"public","site_admin":false},"created_at":"2025-01-23T11:52:59Z","updated_at":"2025-01-23T11:55:20Z","body":"对于卡片消息回调的 Value 应该定义成interface{} . 至少目前的卡片消息回调, 回调事件的值 支持 字符串,如果用字符串传进来 就直接cannot unmarshal string into Go struct XXXXXXX 。为了不出发这个error 只能强制使用 对象结构作为value\nevent *callback.CardActionTriggerEvent\n```go\ntype CallBackAction struct {\n\tValue map[string]interface{} `json:\"value\"`\n\tTag string `json:\"tag\"`\n\tOption string `json:\"option\"`\n\tTimezone string `json:\"timezone\"`\n\tName string `json:\"name\"`\n\tFormValue map[string]interface{} `json:\"form_value\"`\n\tInputValue string `json:\"input_value\"`\n\tOptions []string `json:\"options\"`\n\tChecked bool `json:\"checked\"`\n}\n```","author_association":"NONE","pin":null,"reactions":{"url":"https://api.github.com/repos/larksuite/oapi-sdk-go/issues/comments/2609615802/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"performed_via_github_app":null,"minimized":null},{"url":"https://api.github.com/repos/larksuite/oapi-sdk-go/issues/comments/2724196179","html_url":"https://github.com/larksuite/oapi-sdk-go/issues/130#issuecomment-2724196179","issue_url":"https://api.github.com/repos/larksuite/oapi-sdk-go/issues/130","id":2724196179,"node_id":"IC_kwDOEiHOJs6iX-9T","user":{"login":"xiaozhi747","id":19251872,"node_id":"MDQ6VXNlcjE5MjUxODcy","avatar_url":"https://avatars.githubusercontent.com/u/19251872?v=4","gravatar_id":"","url":"https://api.github.com/users/xiaozhi747","html_url":"https://github.com/xiaozhi747","followers_url":"https://api.github.com/users/xiaozhi747/followers","following_url":"https://api.github.com/users/xiaozhi747/following{/other_user}","gists_url":"https://api.github.com/users/xiaozhi747/gists{/gist_id}","starred_url":"https://api.github.com/users/xiaozhi747/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xiaozhi747/subscriptions","organizations_url":"https://api.github.com/users/xiaozhi747/orgs","repos_url":"https://api.github.com/users/xiaozhi747/repos","events_url":"https://api.github.com/users/xiaozhi747/events{/privacy}","received_events_url":"https://api.github.com/users/xiaozhi747/received_events","type":"User","user_view_type":"public","site_admin":false},"created_at":"2025-03-14T09:53:22Z","updated_at":"2025-03-14T09:53:22Z","body":"还没修复么?","author_association":"NONE","pin":null,"reactions":{"url":"https://api.github.com/repos/larksuite/oapi-sdk-go/issues/comments/2724196179/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"performed_via_github_app":null,"minimized":null},{"url":"https://api.github.com/repos/larksuite/oapi-sdk-go/issues/comments/2724235531","html_url":"https://github.com/larksuite/oapi-sdk-go/issues/130#issuecomment-2724235531","issue_url":"https://api.github.com/repos/larksuite/oapi-sdk-go/issues/130","id":2724235531,"node_id":"IC_kwDOEiHOJs6iYIkL","user":{"login":"maemual","id":2352843,"node_id":"MDQ6VXNlcjIzNTI4NDM=","avatar_url":"https://avatars.githubusercontent.com/u/2352843?v=4","gravatar_id":"","url":"https://api.github.com/users/maemual","html_url":"https://github.com/maemual","followers_url":"https://api.github.com/users/maemual/followers","following_url":"https://api.github.com/users/maemual/following{/other_user}","gists_url":"https://api.github.com/users/maemual/gists{/gist_id}","starred_url":"https://api.github.com/users/maemual/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maemual/subscriptions","organizations_url":"https://api.github.com/users/maemual/orgs","repos_url":"https://api.github.com/users/maemual/repos","events_url":"https://api.github.com/users/maemual/events{/privacy}","received_events_url":"https://api.github.com/users/maemual/received_events","type":"User","user_view_type":"public","site_admin":false},"created_at":"2025-03-14T10:12:24Z","updated_at":"2025-03-14T10:12:24Z","body":"\n@xiaozhi747 早就支持了新版卡片回调,建议按照 README 文档使用。","author_association":"COLLABORATOR","pin":null,"reactions":{"url":"https://api.github.com/repos/larksuite/oapi-sdk-go/issues/comments/2724235531/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"performed_via_github_app":null,"minimized":null},{"url":"https://api.github.com/repos/larksuite/oapi-sdk-go/issues/comments/3568865279","html_url":"https://github.com/larksuite/oapi-sdk-go/issues/130#issuecomment-3568865279","issue_url":"https://api.github.com/repos/larksuite/oapi-sdk-go/issues/130","id":3568865279,"node_id":"IC_kwDOEiHOJs7UuI__","user":{"login":"eyotang","id":2398680,"node_id":"MDQ6VXNlcjIzOTg2ODA=","avatar_url":"https://avatars.githubusercontent.com/u/2398680?v=4","gravatar_id":"","url":"https://api.github.com/users/eyotang","html_url":"https://github.com/eyotang","followers_url":"https://api.github.com/users/eyotang/followers","following_url":"https://api.github.com/users/eyotang/following{/other_user}","gists_url":"https://api.github.com/users/eyotang/gists{/gist_id}","starred_url":"https://api.github.com/users/eyotang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eyotang/subscriptions","organizations_url":"https://api.github.com/users/eyotang/orgs","repos_url":"https://api.github.com/users/eyotang/repos","events_url":"https://api.github.com/users/eyotang/events{/privacy}","received_events_url":"https://api.github.com/users/eyotang/received_events","type":"User","user_view_type":"public","site_admin":false},"created_at":"2025-11-24T04:13:19Z","updated_at":"2025-11-24T04:13:19Z","body":"> 卡片回调一直报这个错误 `json: cannot unmarshal string into Go struct field CardAction.Header of type []string]`\n\nv3.4.3也有这个问题,请问怎么解决的?header是map[string]string,但是sdk里面定义的是map[string][]string","author_association":"NONE","pin":null,"reactions":{"url":"https://api.github.com/repos/larksuite/oapi-sdk-go/issues/comments/3568865279/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"performed_via_github_app":null,"minimized":null}]