Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/spreed.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2019-10-24 15:48:38 +0300
committerJoas Schilling <coding@schilljs.com>2019-10-24 15:48:38 +0300
commit50336f213fea1225021bd3dca7a12855bb43461b (patch)
tree8684c2d2ef7cd177b138d2a80505b9d18d1220a1
parent2203284f01625c111c8a47918b38f9fb4f8ba0a6 (diff)
304 on the message API is no errorbugfix/vuejs/304-on-message-api-is-no-error
Signed-off-by: Joas Schilling <coding@schilljs.com>
-rw-r--r--src/services/messagesService.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/services/messagesService.js b/src/services/messagesService.js
index 1b5f8e8b2..31eb50f4c 100644
--- a/src/services/messagesService.js
+++ b/src/services/messagesService.js
@@ -34,7 +34,9 @@ const fetchMessages = async function(token) {
const response = await axios.get(generateOcsUrl('apps/spreed/api/v1/chat', 2) + token + '?lookIntoFuture=0')
return response
} catch (error) {
- console.debug('Error while fetching messages: ', error)
+ if (!error.response || !error.response.status || error.response.status !== 304) {
+ console.debug('Error while fetching messages: ', error)
+ }
}
}
@@ -47,10 +49,12 @@ const fetchMessages = async function(token) {
*/
const lookForNewMessges = async function(token, lastKnownMessageId) {
try {
- const response = await axios.get(generateOcsUrl('apps/spreed/api/v1/chat', 2) + token + '?lookIntoFuture=1' + '&includeLastKnown=0' + `&lastKnownMessageId=${lastKnownMessageId}`)
+ const response = await axios.get(generateOcsUrl('apps/spreed/api/v1/chat', 2) + token + '?lookIntoFuture=1' + `&lastKnownMessageId=${lastKnownMessageId}`)
return response
} catch (error) {
- console.debug('Error while looking for new message: ', error)
+ if (!error.response || !error.response.status || error.response.status !== 304) {
+ console.debug('Error while looking for new messages: ', error)
+ }
}
}