fixed tests, review fixes, now storing local users with downcase screen name for
better compatibility
This commit is contained in:
parent
489f840d84
commit
06d39b62a8
5 changed files with 19 additions and 12 deletions
|
@ -73,7 +73,7 @@ const mergeOrAdd = (arr, obj, item) => {
|
|||
if (oldItem) {
|
||||
// We already have this, so only merge the new info.
|
||||
// We ignore null values to avoid overwriting existing properties with missing data
|
||||
// we also skip 'used' because that is handled by users module
|
||||
// we also skip 'user' because that is handled by users module
|
||||
merge(oldItem, omitBy(item, (v, k) => v === null || k === 'user'))
|
||||
// Reactivity fix.
|
||||
oldItem.attachments.splice(oldItem.attachments.length)
|
||||
|
|
|
@ -18,7 +18,7 @@ export const mergeOrAdd = (arr, obj, item) => {
|
|||
arr.push(item)
|
||||
obj[item.id] = item
|
||||
if (item.screen_name && !item.screen_name.includes('@')) {
|
||||
obj[item.screen_name] = item
|
||||
obj[item.screen_name.toLowerCase()] = item
|
||||
}
|
||||
return { item, new: true }
|
||||
}
|
||||
|
@ -132,7 +132,7 @@ export const mutations = {
|
|||
}
|
||||
|
||||
export const getters = {
|
||||
findUser: state => query => state.usersObject[query]
|
||||
findUser: state => query => state.usersObject[typeof query === 'string' ? query.toLowerCase() : query]
|
||||
}
|
||||
|
||||
export const defaultState = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue