Skip to content

[FIX] channels.history, groups.history and im.history REST endpoints not respecting hide system message config#22364

Merged
sampaiodiego merged 1 commit intodevelopfrom
fix-history-rest-endpoints
Jun 16, 2021
Merged

[FIX] channels.history, groups.history and im.history REST endpoints not respecting hide system message config#22364
sampaiodiego merged 1 commit intodevelopfrom
fix-history-rest-endpoints

Conversation

@sampaiodiego
Copy link
Copy Markdown
Member

@sampaiodiego sampaiodiego commented Jun 15, 2021

Proposed changes (including videos or screenshots)

Issue(s)

Closes #20442

Steps to test or reproduce

Further comments

@sampaiodiego sampaiodiego requested a review from a team June 15, 2021 12:50
Comment thread definition/ISetting.ts

export type SettingValueMultiSelect = Array<{key: string; i18nLabel: string}>
export type SettingValueRoomPick = Array<{_id: string; name: string}> | string
export type SettingValueMultiSelect = string[];
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this needed? 👀

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤫

jk 😂 the type was actually wrong.. the value for a multi-select setting is an array of strings.. so I had to fix the type to be able to use it correctly.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here is the setting record:

{
    "_id" : "Hide_System_Messages",
    "createdAt" : ISODate("2021-01-11T12:21:35.320Z"),
    "group" : "Message",
    "i18nDescription" : "Hide_System_Messages_Description",
    "i18nLabel" : "Hide_System_Messages",
    "ts" : ISODate("2021-06-14T12:21:41.761Z"),
    "type" : "multiSelect",
    "value" : [ 
        "uj", 
        "ul", 
        "ru"
    ],
    "values" : [ 
        {
            "key" : "uj",
            "i18nLabel" : "Message_HideType_uj"
        }, 
        {
            "key" : "ul",
            "i18nLabel" : "Message_HideType_ul"
        }, 
        {
            "key" : "ru",
            "i18nLabel" : "Message_HideType_ru"
        }, 
        {
            "key" : "au",
            "i18nLabel" : "Message_HideType_au"
        }, 
        {
            "key" : "mute_unmute",
            "i18nLabel" : "Message_HideType_mute_unmute"
        }, 
        {
            "key" : "r",
            "i18nLabel" : "Message_HideType_r"
        }, 
        {
            "key" : "ut",
            "i18nLabel" : "Message_HideType_ut"
        }, 
        {
            "key" : "wm",
            "i18nLabel" : "Message_HideType_wm"
        }, 
        {
            "key" : "rm",
            "i18nLabel" : "Message_HideType_rm"
        }, 
        {
            "key" : "subscription-role-added",
            "i18nLabel" : "Message_HideType_subscription_role_added"
        }, 
        {
            "key" : "subscription-role-removed",
            "i18nLabel" : "Message_HideType_subscription_role_removed"
        }, 
        {
            "key" : "room_archived",
            "i18nLabel" : "Message_HideType_room_archived"
        }, 
        {
            "key" : "room_unarchived",
            "i18nLabel" : "Message_HideType_room_unarchived"
        }, 
        {
            "key" : "room_changed_privacy",
            "i18nLabel" : "Message_HideType_room_changed_privacy"
        }, 
        {
            "key" : "room_changed_avatar",
            "i18nLabel" : "Message_HideType_room_changed_avatar"
        }, 
        {
            "key" : "room_changed_topic",
            "i18nLabel" : "Message_HideType_room_changed_topic"
        }, 
        {
            "key" : "room_e2e_enabled",
            "i18nLabel" : "Message_HideType_room_enabled_encryption"
        }, 
        {
            "key" : "room_e2e_disabled",
            "i18nLabel" : "Message_HideType_room_disabled_encryption"
        }
    ]
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah I see it 😂 nice nice, let's approve this then 👀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants