1
0
mirror of https://github.com/muety/wakapi.git synced 2023-08-10 21:12:56 +03:00

Merge pull request #458 from xxchan/xxchan/perfect-bobolink

fix: when importing from wakapi, os & editor are reversed
This commit is contained in:
Ferdinand Mütsch 2023-01-20 10:12:36 +01:00 committed by GitHub
commit 0160a9ae52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -284,8 +284,8 @@ func mapHeartbeat(
// try to parse id as an actual user agent string (as returned by wakapi) // try to parse id as an actual user agent string (as returned by wakapi)
if opSys, editor, err := utils.ParseUserAgent(entry.UserAgentId); err == nil { if opSys, editor, err := utils.ParseUserAgent(entry.UserAgentId); err == nil {
ua = &wakatime.UserAgentEntry{ ua = &wakatime.UserAgentEntry{
Editor: opSys, Editor: editor,
Os: editor, Os: opSys,
} }
} else { } else {
ua = &wakatime.UserAgentEntry{ ua = &wakatime.UserAgentEntry{