diff --git a/src/components/mention_link/mention_link.js b/src/components/mention_link/mention_link.js
index a60a8040..4d27fe6d 100644
--- a/src/components/mention_link/mention_link.js
+++ b/src/components/mention_link/mention_link.js
@@ -41,7 +41,7 @@ const MentionLink = {
},
computed: {
user () {
- return this.url && this.$store.getters.findUserByUrl(this.url)
+ return this.url && this.$store && this.$store.getters.findUserByUrl(this.url)
},
isYou () {
// FIXME why user !== currentUser???
diff --git a/src/components/mentions_line/mentions_line.js b/src/components/mentions_line/mentions_line.js
index 33e25391..83eeea4c 100644
--- a/src/components/mentions_line/mentions_line.js
+++ b/src/components/mentions_line/mentions_line.js
@@ -15,7 +15,7 @@ const MentionsLine = {
},
computed: {
limit () {
- return 2
+ return 5
},
mentionsComputed () {
return this.mentions.slice(0, this.limit)
diff --git a/src/components/rich_content/rich_content.jsx b/src/components/rich_content/rich_content.jsx
index 4b7d4d37..32b737ec 100644
--- a/src/components/rich_content/rich_content.jsx
+++ b/src/components/rich_content/rich_content.jsx
@@ -159,7 +159,7 @@ export default Vue.component('RichContent', {
return item // We'll handle it later
}
case 'span':
- if (attrs['class'].includes('h-card')) {
+ if (this.handleLinks && attrs['class'] && attrs['class'].includes('h-card')) {
return ['', children.map(processItem), '']
}
}
diff --git a/test/unit/specs/components/rich_content.spec.js b/test/unit/specs/components/rich_content.spec.js
index dfc229c0..b29edeab 100644
--- a/test/unit/specs/components/rich_content.spec.js
+++ b/test/unit/specs/components/rich_content.spec.js
@@ -56,7 +56,7 @@ describe('RichContent', () => {
expect(wrapper.html()).to.eql(compwrap(expected))
})
- it('replaces first mention with mentionsline', () => {
+ it('replaces mention with mentionsline', () => {
const html = p(
makeMention('John'),
' how are you doing today?'
@@ -234,7 +234,7 @@ describe('RichContent', () => {
].join('\n')
const expected = [
'>quote',
- mentionsLine(1)
+ mentionsLine(1),
'>quote',
'>quote'
].join('\n')
@@ -267,7 +267,7 @@ describe('RichContent', () => {
const expected = [
'Bruh',
'Bruh',
- mentionsLine(3)
+ mentionsLine(3),
'Bruh'
].join('
')
@@ -322,53 +322,6 @@ describe('RichContent', () => {
})
it('rich contents of a mention are handled properly', () => {
- const html = [
- p(
- 'Testing'
- ),
- p(
- '',
- '',
- 'https://',
- '',
- 'lol.tld/',
- '',
- '',
- ''
- )
- ].join('')
- const expected = [
- p(
- 'Testing'
- ),
- p(
- '