Merge branch 'develop' into feat/v5-ui-redesign
This commit is contained in:
@@ -274,3 +274,5 @@ AZURE_APP_SECRET=
|
||||
# Set to true if you want to remove stale contact inboxes
|
||||
# contact_inboxes with no conversation older than 90 days will be removed
|
||||
# REMOVE_STALE_CONTACT_INBOX_JOB_STATUS=false
|
||||
|
||||
# REDIS_ALFRED_SIZE=10
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
4.8.0
|
||||
4.9.1
|
||||
|
||||
@@ -150,8 +150,6 @@ const derivedAttributes = computed(() =>
|
||||
<SettingsLayout
|
||||
:is-loading="uiFlags.isFetching"
|
||||
:loading-message="$t('ATTRIBUTES_MGMT.LOADING')"
|
||||
:no-records-found="!attributes.length"
|
||||
:no-records-message="$t('ATTRIBUTES_MGMT.LIST.EMPTY_RESULT.404')"
|
||||
>
|
||||
<template #header>
|
||||
<BaseSettingsHeader
|
||||
@@ -177,7 +175,7 @@ const derivedAttributes = computed(() =>
|
||||
class="max-w-xl"
|
||||
@tab-changed="onClickTabChange"
|
||||
/>
|
||||
<div class="grid gap-3">
|
||||
<div v-if="derivedAttributes.length" class="grid gap-3">
|
||||
<AttributeListItem
|
||||
v-for="attribute in derivedAttributes"
|
||||
:key="attribute.id"
|
||||
@@ -187,6 +185,12 @@ const derivedAttributes = computed(() =>
|
||||
@delete="handleDeleteAttribute"
|
||||
/>
|
||||
</div>
|
||||
<p
|
||||
v-else
|
||||
class="flex-1 py-20 text-n-slate-12 flex items-center justify-center text-base"
|
||||
>
|
||||
{{ $t('ATTRIBUTES_MGMT.LIST.EMPTY_RESULT.404') }}
|
||||
</p>
|
||||
</div>
|
||||
</template>
|
||||
<AddAttribute
|
||||
|
||||
@@ -42,6 +42,10 @@ class Messages::MarkdownRenderers::InstagramRenderer < Messages::MarkdownRendere
|
||||
cr
|
||||
end
|
||||
|
||||
def code_block(node)
|
||||
out(node.string_content)
|
||||
end
|
||||
|
||||
def softbreak(_node)
|
||||
out("\n")
|
||||
end
|
||||
|
||||
@@ -30,6 +30,10 @@ class Messages::MarkdownRenderers::WhatsAppRenderer < Messages::MarkdownRenderer
|
||||
cr
|
||||
end
|
||||
|
||||
def code_block(node)
|
||||
out(node.string_content)
|
||||
end
|
||||
|
||||
def softbreak(_node)
|
||||
out("\n")
|
||||
end
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
shared: &shared
|
||||
version: '4.9.0'
|
||||
version: '4.9.1'
|
||||
|
||||
development:
|
||||
<<: *shared
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
# Alfred
|
||||
# Add here as you use it for more features
|
||||
# Used for Round Robin, Conversation Emails & Online Presence
|
||||
$alfred = ConnectionPool.new(size: 5, timeout: 1) do
|
||||
alfred_size = ENV.fetch('REDIS_ALFRED_SIZE', 5)
|
||||
$alfred = ConnectionPool.new(size: alfred_size, timeout: 1) do
|
||||
redis = Rails.env.test? ? MockRedis.new : Redis.new(Redis::Config.app)
|
||||
Redis::Namespace.new('alfred', redis: redis, warning: true)
|
||||
end
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@chatwoot/chatwoot",
|
||||
"version": "4.9.0",
|
||||
"version": "4.9.1",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"eslint": "eslint app/**/*.{js,vue}",
|
||||
|
||||
@@ -74,6 +74,24 @@ RSpec.describe Messages::MarkdownRendererService, type: :service do
|
||||
expect(result.scan("\n").count).to eq(4)
|
||||
expect(result).to include("Para 1\n\n\n\nPara 2")
|
||||
end
|
||||
|
||||
it 'renders code blocks as plain text' do
|
||||
content = "```\ncode here\n```"
|
||||
result = described_class.new(content, channel_type).render
|
||||
expect(result.strip).to eq('code here')
|
||||
end
|
||||
|
||||
it 'renders indented code blocks as plain text preserving exact content' do
|
||||
content = ' indented code line'
|
||||
result = described_class.new(content, channel_type).render
|
||||
expect(result).to eq('indented code line')
|
||||
end
|
||||
|
||||
it 'handles code blocks with emojis and special characters without stack overflow' do
|
||||
content = " first line\n 🌐 second line\n"
|
||||
result = described_class.new(content, channel_type).render
|
||||
expect(result).to eq("first line\n🌐 second line")
|
||||
end
|
||||
end
|
||||
|
||||
context 'when channel is Channel::Instagram' do
|
||||
@@ -130,6 +148,24 @@ RSpec.describe Messages::MarkdownRendererService, type: :service do
|
||||
expect(result.scan("\n").count).to eq(4)
|
||||
expect(result).to include("Para 1\n\n\n\nPara 2")
|
||||
end
|
||||
|
||||
it 'renders code blocks as plain text' do
|
||||
content = "```\ncode here\n```"
|
||||
result = described_class.new(content, channel_type).render
|
||||
expect(result.strip).to eq('code here')
|
||||
end
|
||||
|
||||
it 'renders indented code blocks as plain text preserving exact content' do
|
||||
content = ' indented code line'
|
||||
result = described_class.new(content, channel_type).render
|
||||
expect(result).to eq('indented code line')
|
||||
end
|
||||
|
||||
it 'handles code blocks with emojis and special characters without stack overflow' do
|
||||
content = " first line\n 🌐 second line\n"
|
||||
result = described_class.new(content, channel_type).render
|
||||
expect(result).to eq("first line\n🌐 second line")
|
||||
end
|
||||
end
|
||||
|
||||
context 'when channel is Channel::Line' do
|
||||
@@ -358,6 +394,18 @@ RSpec.describe Messages::MarkdownRendererService, type: :service do
|
||||
expect(result).to include('1. first step')
|
||||
expect(result).to include('2. second step')
|
||||
end
|
||||
|
||||
it 'renders code blocks as plain text' do
|
||||
content = "```\ncode here\n```"
|
||||
result = described_class.new(content, channel_type).render
|
||||
expect(result.strip).to eq('code here')
|
||||
end
|
||||
|
||||
it 'handles code blocks with emojis and special characters without stack overflow' do
|
||||
content = " first line\n 🌐 second line\n"
|
||||
result = described_class.new(content, channel_type).render
|
||||
expect(result).to eq("first line\n🌐 second line")
|
||||
end
|
||||
end
|
||||
|
||||
context 'when channel is Channel::TwilioSms' do
|
||||
|
||||
Reference in New Issue
Block a user