Skip to content

Commit

Permalink
Merge pull request #144 from Adamant-im/bug-with-missing-link-in-mome…
Browse files Browse the repository at this point in the history
…nt-message

Fix: added link wrapper
  • Loading branch information
zyuhel authored Sep 25, 2018
2 parents 99c0d20 + 91a4372 commit 501dafa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/store/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {base64regex, WelcomeMessage, Cryptos} from '../lib/constants'
import Queue from 'promise-queue'
import utils from '../lib/adamant'
import i18n from '../i18n'
import renderMarkdown from '../lib/markdown'

var maxConcurrent = 1
var maxQueue = Infinity
Expand Down Expand Up @@ -179,6 +180,8 @@ const store = {
let internalPayload = Object.assign({}, payload)
internalPayload.message = internalPayload.message.replace(/\n/g, '<br>')
if (currentDialogs.last_message.timestamp < payload.timestamp || !currentDialogs.last_message.timestamp) {
internalPayload.message = renderMarkdown(internalPayload.message)
internalPayload.message = internalPayload.message.replace(/<p>|<\/p>/g, '')
updateLastChatMessage(currentDialogs, internalPayload, 'sent', 'from', payload.id)
}
Vue.set(chats[partner].messages, payload.id, internalPayload)
Expand Down
4 changes: 4 additions & 0 deletions src/views/Chats.vue
Original file line number Diff line number Diff line change
Expand Up @@ -278,4 +278,8 @@ export default {
font-size: 8px;
}

.md-list-item a {
color: black !important;
}

</style>

0 comments on commit 501dafa

Please sign in to comment.