kusold / todoist-habitrpg

One way sync from Todoist -> HabitRPG
120 stars 14 forks source link

Deleted tasks don't sync #59

Open ajfclark opened 7 years ago

ajfclark commented 7 years ago

Deleting a task in Todoist doesn't always sync to Habitica. This can leave stale dailies causing damage.

ajfclark commented 7 years ago

One instance where this seems to occur is if an item is created with a due date in the past. I created a task Test task yesterday and synced. I then deleted the item and synced again but the task remains in Habitica.

I added some debugging to the script and habit.deleteTask method is called, but it doesn't seem to work?

ajfclark commented 7 years ago

Noticed that the habitapi creation call used by the deletion routine uses a null URL which probably returns 404s.

Updating the call to use the explicit API URL seems to resolve this issue.