Skip to content

Commit 845f8e4

Browse files
committed
fix missing category
1 parent f4a6b32 commit 845f8e4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

app/controllers/api/hackatime/v1/hackatime_controller.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,9 @@ def handle_heartbeat(heartbeat_array)
236236

237237
parsed_ua = WakatimeService.parse_user_agent(heartbeat[:user_agent])
238238

239+
# if category is not set, just default to coding
240+
heartbeat[:category] ||= "coding"
241+
239242
# special case: if the entity is "test.txt", this is a test heartbeat
240243
if heartbeat[:entity] == "test.txt"
241244
source_type = :test_entry

0 commit comments

Comments
 (0)