RocketChat/Rocket.Chat

View on GitHub
apps/meteor/app/utils/server/lib/normalizeMessagesForUser.ts

Summary

Maintainability
A
1 hr
Test Coverage

Function normalizeMessagesForUser has 49 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const normalizeMessagesForUser = async (messages: IMessage[], uid?: string): Promise<IMessage[]> => {
    // if not using real names, there is nothing else to do
    if (!settings.get('UI_Use_Real_Name')) {
        return messages.map((message) => filterStarred(message, uid));
    }
Severity: Minor
Found in apps/meteor/app/utils/server/lib/normalizeMessagesForUser.ts - About 1 hr to fix

    There are no issues that match your filters.

    Category
    Status