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

${os} 参数识别错误导致邮件中通知为 Unknown #7039

Closed
4 tasks done
Anyexyz opened this issue Nov 15, 2024 · 2 comments · Fixed by #7045
Closed
4 tasks done

${os} 参数识别错误导致邮件中通知为 Unknown #7039

Anyexyz opened this issue Nov 15, 2024 · 2 comments · Fixed by #7045
Assignees
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.

Comments

@Anyexyz
Copy link
Contributor

Anyexyz commented Nov 15, 2024

前置条件

  • 已经在 issues 列表中搜索了相关问题。
  • 这是 Halo 项目本身存在的问题,如果是非项目本身的问题(如:安装部署问题),建议在 Discussions 提交。
  • 已经尝试过停用所有的插件,排除是插件导致的问题。
  • 如果是插件和主题的问题,请在对应的插件和主题仓库提交。

系统信息

使用的哪种方式运行?

Docker Compose

发生了什么?

Halo 无法识别 OpenHarmony 设备的 user-agent,导致在 application/src/main/resources/extensions/notification-templates.yaml你的 [(${site.title})] 账号被用于在 [(${os})] 上登录 中的 [(${os})] 被填充为 Unknown
参考 UA:Mozilla/5.0 (Phone; OpenHarmony 5.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36 ArkWeb/4.1.6.1 Mobile HuaweiBrowser/5.0.4.300

@JohnNiang
Copy link
Member

/good-first-issue

似乎只需要适配一下下面这个方法就行了。

private static Pair parseOperatingSystem(String userAgent) {

Copy link

f2c-ci-robot bot commented Nov 18, 2024

@JohnNiang:
This request has been marked as suitable for new contributors.

Please ensure the request meets the requirements listed here.

If this request no longer meets these requirements, the label can be removed
by commenting with the /remove-good-first-issue command.

In response to this:

/good-first-issue

似乎只需要适配一下下面这个方法就行了。

private static Pair parseOperatingSystem(String userAgent) {

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@f2c-ci-robot f2c-ci-robot bot added good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. labels Nov 18, 2024
f2c-ci-robot bot pushed a commit that referenced this issue Nov 18, 2024
#### What type of PR is this?
/kind feature 

#### What this PR does / why we need it:
This PR adds support for detecting OpenHarmony as a device operating system.

#### Which issue(s) this PR fixes:
Fixes #7039

#### Special notes for your reviewer:
This PR introduces minor changes in the device OS detection logic.

#### Does this PR introduce a user-facing change?
```release-note
新设备登录通知的操作系统名支持展示鸿蒙替代 Unknown
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants