Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Tags: silenceper/wechat

Tags

v2.1.11

Toggle v2.1.11's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
update:小程序ocr识别 refs#864 (#865)

* update:小程序ocr识别

* fix:删除ResPlateNumber

---------

Co-authored-by: 阴佳帅 <[email protected]>

v2.1.10

Toggle v2.1.10's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix: improve type safety in httpWithTLS for custom RoundTripper (#861)

* fix: improve type safety in httpWithTLS for custom RoundTripper

Add type assertion check to handle cases where DefaultHTTPClient.Transport
is a custom http.RoundTripper implementation (not *http.Transport).

This improves upon the fix in PR #844 which only handled nil Transport.
The previous code would still panic if users set a custom RoundTripper:

  trans := baseTransport.(*http.Transport).Clone()  // panic if not *http.Transport

Now safely handles three scenarios:
1. Transport is nil -> use http.DefaultTransport
2. Transport is *http.Transport -> clone it
3. Transport is custom RoundTripper -> use http.DefaultTransport

Added comprehensive test cases:
- TestHttpWithTLS_NilTransport
- TestHttpWithTLS_CustomTransport
- TestHttpWithTLS_CustomRoundTripper

Related to #803

* refactor: reduce code duplication and complexity in httpWithTLS

- Eliminate duplicate http.DefaultTransport.Clone() calls
- Reduce cyclomatic complexity by simplifying conditional logic
- Use nil check pattern instead of nested else branches
- Maintain same functionality with cleaner code structure

This addresses golangci-lint warnings for dupl and gocyclo.

* fix: add newline at end of http_test.go

Fix gofmt -s compliance issue:
- File must end with newline character
- Addresses golangci-lint gofmt error on line 81

This fixes CI check failure.

v2.1.10-rc.1

Toggle v2.1.10-rc.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix BatchGetExternalUserDetails to return NextCursor in response (#849)

v2.1.9

Toggle v2.1.9's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
feat: 微信小程序-动态消息及订阅消息 (#835)

* feat: 微信小程序-动态消息及订阅消息

* feat: 微信小程序-动态消息及订阅消息

* feat: 微信小程序-动态消息及订阅消息

v2.1.9-rc.1

Toggle v2.1.9-rc.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
feat: 微信小程序-登录及用户信息 (#830)

* feat: 微信小程序-登录及用户信息

* feat: 微信小程序-登录及用户信息

v2.1.8

Toggle v2.1.8's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix: work js-api signature (#818)

* feat: enhance WorkAccessToken to include AgentID for improved token management

- Added AgentID field to WorkAccessToken struct.
- Updated NewWorkAccessToken function to accept AgentID as a parameter.
- Modified access token cache key to incorporate AgentID, ensuring unique cache entries per agent.

This change improves the handling of access tokens in a multi-agent environment.

* refactor: enhance WorkAccessToken to improve cache key handling

- Updated the AgentID field in WorkAccessToken struct to clarify its optional nature for distinguishing applications.
- Modified the access token cache key construction to support both new and legacy formats based on the presence of AgentID.
- Added comments for better understanding of the cache key logic and its compatibility with historical versions.

This change improves the flexibility and clarity of access token management in multi-agent scenarios.

* feat(work): add JsSdk method for JavaScript SDK integration

- Introduced a new JsSdk method in the Work struct to facilitate the creation of a Js instance.
- This addition enhances the functionality of the Work module by enabling JavaScript SDK support.

This change improves the integration capabilities for developers working with the WeChat Work API.

* fix gofmt

* refactor(jsapi): simplify signature generation in GetConfig and GetAgentConfig methods

- Replaced the use of strconv to format the signature string with fmt.Sprintf for improved readability.
- Updated the signature generation logic in both GetConfig and GetAgentConfig methods to use a single formatted string.

This change enhances code clarity and maintains functionality in the signature generation process.

* fix gofmt

* fix gofmt

* fix gofmt

* fix gofmt

* refactor(js): correct initialization of Config in GetConfig method

- Removed redundant initialization of the Config variable and ensured it is instantiated correctly before use.
- This change improves code clarity and maintains the intended functionality of the GetConfig method.

v2.1.8-rc.1

Toggle v2.1.8-rc.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix: work js-api signature (#818)

* feat: enhance WorkAccessToken to include AgentID for improved token management

- Added AgentID field to WorkAccessToken struct.
- Updated NewWorkAccessToken function to accept AgentID as a parameter.
- Modified access token cache key to incorporate AgentID, ensuring unique cache entries per agent.

This change improves the handling of access tokens in a multi-agent environment.

* refactor: enhance WorkAccessToken to improve cache key handling

- Updated the AgentID field in WorkAccessToken struct to clarify its optional nature for distinguishing applications.
- Modified the access token cache key construction to support both new and legacy formats based on the presence of AgentID.
- Added comments for better understanding of the cache key logic and its compatibility with historical versions.

This change improves the flexibility and clarity of access token management in multi-agent scenarios.

* feat(work): add JsSdk method for JavaScript SDK integration

- Introduced a new JsSdk method in the Work struct to facilitate the creation of a Js instance.
- This addition enhances the functionality of the Work module by enabling JavaScript SDK support.

This change improves the integration capabilities for developers working with the WeChat Work API.

* fix gofmt

* refactor(jsapi): simplify signature generation in GetConfig and GetAgentConfig methods

- Replaced the use of strconv to format the signature string with fmt.Sprintf for improved readability.
- Updated the signature generation logic in both GetConfig and GetAgentConfig methods to use a single formatted string.

This change enhances code clarity and maintains functionality in the signature generation process.

* fix gofmt

* fix gofmt

* fix gofmt

* fix gofmt

* refactor(js): correct initialization of Config in GetConfig method

- Removed redundant initialization of the Config variable and ensured it is instantiated correctly before use.
- This change improves code clarity and maintains the intended functionality of the GetConfig method.

v2.1.7

Toggle v2.1.7's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
add-show_splash_ad-for-qrcodeparam (#794)

v2.1.7-rc.1

Toggle v2.1.7-rc.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
feat:追加动态消息接口 (#775)

* 小程序发货信息管理

* fix golang lint

* fix miss

* fix lint

* fix lint

* fix lint

* 修复查询参数last_index=“”时异常

* 小程序消息推送

* fix lint errors

* fix lint

* fix lint

* fix lint,

* 简化写法

* fix 简化写法

* fix name in comments

* Update miniprogram.go

* add events

* change GoodsInfo type

* change statements to 50

* 追加xml支持

* fix cl lint

* 追加动态消息

* 删除多余空格

* 修复命名

* 修复createActivityId返回值类型

v2.1.6

Toggle v2.1.6's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
支持在请求前修改各api的地址 (#736)

* 增加URI修改接口,以支持正向代理

* Update http.go

* Update http.go