chore: more fixes

This commit is contained in:
Sojan 2021-03-06 16:37:46 +05:30
parent bedec53f0f
commit f8f0d36636
5 changed files with 6 additions and 6 deletions

View file

@ -37,7 +37,7 @@
:sender="data.sender" :sender="data.sender"
:is-a-tweet="isATweet" :is-a-tweet="isATweet"
:is-email="isEmailContentType" :is-email="isEmailContentType"
:is-private="data.private" :is-private="data.is_private_note"
:message-type="data.message_type" :message-type="data.message_type"
:readable-time="readableTime" :readable-time="readableTime"
:source-id="data.source_id" :source-id="data.source_id"
@ -176,7 +176,7 @@ export default {
bubbleClass() { bubbleClass() {
return { return {
bubble: this.isBubble, bubble: this.isBubble,
'is-private': this.data.private, 'is-private': this.data.is_private_note,
'is-image': this.hasImageAttachment, 'is-image': this.hasImageAttachment,
'is-text': this.hasText, 'is-text': this.hasText,
}; };

View file

@ -12,7 +12,7 @@ export default {
chat => chat =>
chat.created_at * 1000 > m.agent_last_seen_at * 1000 && chat.created_at * 1000 > m.agent_last_seen_at * 1000 &&
chat.message_type === 0 && chat.message_type === 0 &&
chat.private !== true chat.is_private_note !== true
).length; ).length;
}, },
readMessages(m) { readMessages(m) {

View file

@ -51,7 +51,7 @@ const getters = {
chatMessage => chatMessage =>
chatMessage.created_at * 1000 > chat.agent_last_seen_at * 1000 && chatMessage.created_at * 1000 > chat.agent_last_seen_at * 1000 &&
chatMessage.message_type === 0 && chatMessage.message_type === 0 &&
chatMessage.private !== true chatMessage.is_private_note !== true
).length; ).length;
}, },
getChatStatusFilter: ({ chatStatusFilter }) => chatStatusFilter, getChatStatusFilter: ({ chatStatusFilter }) => chatStatusFilter,

View file

@ -54,7 +54,7 @@ class NotificationListener < BaseListener
end end
def generate_notifications_for_mentions(message, account) def generate_notifications_for_mentions(message, account)
return unless message.private? return unless message.is_private_note?
return if message.content.blank? return if message.content.blank?

View file

@ -36,7 +36,7 @@ RSpec.describe Message, type: :model do
end end
it 'wont call notify email method for private notes' do it 'wont call notify email method for private notes' do
message.private = true message.is_private_note = true
allow(ConversationReplyEmailWorker).to receive(:perform_in).and_return(true) allow(ConversationReplyEmailWorker).to receive(:perform_in).and_return(true)
message.save! message.save!
expect(ConversationReplyEmailWorker).not_to have_received(:perform_in) expect(ConversationReplyEmailWorker).not_to have_received(:perform_in)