remove non alphanumeric from chatroom generation

This commit is contained in:
Barry Gitarts 2020-01-08 14:17:06 -05:00 committed by Barry G
parent a483e1cd45
commit 905093288d
1 changed files with 1 additions and 1 deletions

View File

@ -3,7 +3,7 @@ import { uniqBy, length } from 'ramda'
const { utils } = web3
export const generateChatRoom = title => `#status-${title.replace(/\s/g, '').toLowerCase()}`
export const generateChatRoom = title => `#status-${title.replace(/\s/g, '').replace(/\W/g, '').toLowerCase()}`
export const formatProjectId = id => utils.toHex(id)
const getFile = filePath => filePath.split('/').slice(-1)[0]