Tatsh / kate-wakatime

Kate plugin to interface with WakaTime
https://tatsh.github.io/kate-wakatime/
11 stars 9 forks source link

Unable to correctly copypaste API keys into the Kate UI #29

Open wizzardx opened 9 months ago

wizzardx commented 9 months ago

In Kate, after installing the Plugin, when I go to Settings -> Configure Wakatime, and then want to copypaste in a wakatime key, eg somethig like this:

waka_f4dce14c-c338-11ee-a99c-532fd2ab51f8 (41 characters long)

Then the UI cuts it off over here:

waka_f4dce14c-c338-11ee-a99c-532fd2a (36 characters)

After saving that in the UI (with no warnings/errors that it was cut off or that it is an invalid key), attempting to save my edited code in Kate, leads to a popup error like this:

Error WakaTime could not authenticate the last request. Verify your API key setting.

alanhamlett commented 9 months ago

It's because the plugin is only saving api key when it's 36 chars long:

https://github.com/Tatsh/kate-wakatime/blob/6e22167c3c5910d7512eec41fbb178bb9072eb72/wakatimeplugin.cpp#L229

Until fixed, try removing the waka_ prefix and it should work.