From 5ba5e5f8c3859d42d9268be2c644db4bb5a0c3c3 Mon Sep 17 00:00:00 2001 From: Sumedha Pramod Date: Wed, 16 Aug 2017 21:19:04 -0700 Subject: [PATCH] Fix: Create annotation in API using thread rather than threadNumber - The annotations API refers to thread numbers as thread, therefore any create API request MUST provide the threadNumber as thread as to avoid adding the new annotation to it's own thread and incrementing the threadNumber --- src/lib/annotations/AnnotationService.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib/annotations/AnnotationService.js b/src/lib/annotations/AnnotationService.js index ce3ceef66..74091bf04 100644 --- a/src/lib/annotations/AnnotationService.js +++ b/src/lib/annotations/AnnotationService.js @@ -86,8 +86,12 @@ class AnnotationService extends EventEmitter { threadID: annotation.threadID }, message: annotation.text, - threadNumber: annotation.threadNumber + thread: annotation.threadNumber }) + // NOTE: Ensure that threadNumbers are sent to the API as + // thread, else the API created annotation will have an + // incremented threadNumber. This is due to the naming system + // in the annotations API }) .then((response) => response.json()) .then((data) => {