mirror of
https://github.com/abhinavxd/libredesk.git
synced 2026-09-21 18:13:29 +00:00
61a70f6b52
move last message details in the `meta` JSONB column of conversations
12 lines
347 B
JavaScript
12 lines
347 B
JavaScript
export function convertTextToHtml (text) {
|
|
const div = document.createElement('div')
|
|
div.innerText = text
|
|
return div.innerHTML.replace(/\n/g, '<br>')
|
|
}
|
|
|
|
export function parseJWT (token) {
|
|
const base64Url = token.split('.')[1]
|
|
const base64 = base64Url.replace(/-/g, '+').replace(/_/g, '/')
|
|
return JSON.parse(atob(base64))
|
|
}
|