You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-07 10:46:24 +03:00
use lodash for unique function instead of rolling our own
This commit is contained in:
@@ -15,7 +15,7 @@ limitations under the License.
|
||||
*/
|
||||
|
||||
import MatrixClientPeg from '../MatrixClientPeg';
|
||||
import {unique} from '../ArrayUtils';
|
||||
import _uniq from 'lodash/uniq';
|
||||
|
||||
/**
|
||||
* Class that takes a Matrix Client and flips the m.direct map
|
||||
@@ -109,7 +109,7 @@ export default class DMRoomMap {
|
||||
userToRooms[userId] = [roomId];
|
||||
} else {
|
||||
roomIds.push(roomId);
|
||||
userToRooms[userId] = unique(roomIds);
|
||||
userToRooms[userId] = _uniq(roomIds);
|
||||
}
|
||||
});
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user