diff options
author | Joas Schilling <coding@schilljs.com> | 2020-01-10 11:47:17 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2020-01-10 11:47:17 +0300 |
commit | 58d7618e34791483799ec9512170bf7134ff0007 (patch) | |
tree | 4e587d1079356c0926fdcfc15c32febc764703b0 | |
parent | 0ef29e161608b230c8b4af8df23d15ab7e866ae4 (diff) |
Fix loading the avatar of users with a space in their id
Signed-off-by: Joas Schilling <coding@schilljs.com>
-rw-r--r-- | src/components/NewMessageForm/AdvancedInput/AdvancedInput.vue | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/components/NewMessageForm/AdvancedInput/AdvancedInput.vue b/src/components/NewMessageForm/AdvancedInput/AdvancedInput.vue index bf63e01d4..3c5df76f1 100644 --- a/src/components/NewMessageForm/AdvancedInput/AdvancedInput.vue +++ b/src/components/NewMessageForm/AdvancedInput/AdvancedInput.vue @@ -38,7 +38,7 @@ {{ getFirstLetterOfGuestName(scope.item.label) }} </div> <Avatar v-else - :user="scope.item.id" + :user="atRemoveQuotesFromUserIdForAvatars(scope.item.id)" :display-name="scope.item.label" :disable-tooltip="true" :disable-menu="true" /> @@ -195,6 +195,13 @@ export default { return true }, + atRemoveQuotesFromUserIdForAvatars(userId) { + if (userId.startsWith('"')) { + return userId.substring(1, userId.length - 1) + } + return userId + }, + /** * Focuses the contenteditable div input */ @@ -207,6 +214,7 @@ export default { }, 0) } }, + /** * Emits the submit event when enter is pressed (look * at the v-on in the template) unless shift is pressed: |