feat: remove sentry log and allow same timestamp (#11100)
This commit is contained in:
@@ -6,7 +6,6 @@ import { MESSAGE_STATUS } from 'shared/constants/messages';
|
|||||||
import wootConstants from 'dashboard/constants/globals';
|
import wootConstants from 'dashboard/constants/globals';
|
||||||
import { BUS_EVENTS } from '../../../../shared/constants/busEvents';
|
import { BUS_EVENTS } from '../../../../shared/constants/busEvents';
|
||||||
import { emitter } from 'shared/helpers/mitt';
|
import { emitter } from 'shared/helpers/mitt';
|
||||||
import * as Sentry from '@sentry/vue';
|
|
||||||
|
|
||||||
const state = {
|
const state = {
|
||||||
allConversations: [],
|
allConversations: [],
|
||||||
@@ -217,18 +216,6 @@ export const mutations = {
|
|||||||
|
|
||||||
// ignore out of order events
|
// ignore out of order events
|
||||||
if (conversation.updated_at < selectedConversation.updated_at) {
|
if (conversation.updated_at < selectedConversation.updated_at) {
|
||||||
Sentry.withScope(scope => {
|
|
||||||
scope.setContext('incoming', conversation);
|
|
||||||
scope.setContext('stored', selectedConversation);
|
|
||||||
scope.setContext('incoming_meta', conversation.meta);
|
|
||||||
scope.setContext('stored_meta', selectedConversation.meta);
|
|
||||||
Sentry.captureMessage('Conversation update mismatch');
|
|
||||||
});
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (conversation.updated_at === selectedConversation.updated_at) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -778,7 +778,7 @@ describe('#mutations', () => {
|
|||||||
expect(state.allConversations[0].status).toEqual('open');
|
expect(state.allConversations[0].status).toEqual('open');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should ignore updates with same timestamps', () => {
|
it('should allow updates with same timestamps', () => {
|
||||||
const state = {
|
const state = {
|
||||||
allConversations: [
|
allConversations: [
|
||||||
{
|
{
|
||||||
@@ -796,7 +796,7 @@ describe('#mutations', () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
mutations[types.UPDATE_CONVERSATION](state, conversation);
|
mutations[types.UPDATE_CONVERSATION](state, conversation);
|
||||||
expect(state.allConversations[0].status).toEqual('open');
|
expect(state.allConversations[0].status).toEqual('resolved');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user