fix: Enforce lowercase usernames for profile queries
This commit is contained in:
committed by
mrugesh mohapatra
parent
92208f7c23
commit
c8f5b20b71
@@ -27,9 +27,10 @@ function* fetchSessionUser() {
|
||||
}
|
||||
}
|
||||
|
||||
function* fetchOtherUser({ payload: maybeUser }) {
|
||||
function* fetchOtherUser({ payload: maybeUser = '' }) {
|
||||
try {
|
||||
const { data } = yield call(getUserProfile, maybeUser);
|
||||
const maybeUserLC = maybeUser.toLowerCase();
|
||||
const { data } = yield call(getUserProfile, maybeUserLC);
|
||||
|
||||
const { entities: { user = {} } = {}, result = '' } = data;
|
||||
const otherUser = user[result] || {};
|
||||
|
Reference in New Issue
Block a user