FIX: Show userGroup flair in autoGroupFlairForUser

AI-generated summary

small-lovely-cat reported a bug in avatar-flair where the function ignored user-selected userGroup flair, incorrectly falling back to autoGroup flair (e.g., Trust Level). This caused issues in places like chat, where a manually set group flair would display as the auto-generated flair until a refresh. The proposed fix prioritizes the user-selected flair while retaining autoGroupFlair as a fallback. After small-lovely-cat requested a review, sam acknowledged that while the API is awkward, the fix itself is correct, thanking the contributor.

There exists a problem in avatar-flair. The function fails to consider userGroup flair, and will fallback to autoGroup flair even when the user set a userGroup flair.

This will cause the flair shown incorrectly in places like chat, e.g., I set my flair to a group flair, but the flair of my DM will be the one of my Trust Level without a refresh.

This commit fix this by considering user selected flair first, while keeping autoGroupFlair as a fallback.

Maybe have a look at this? :meow_heart:

Our API here is certainly looking somewhat awkward, but I think the fix is right. Thanks.

1 Like

This topic was automatically closed after 16 hours. New replies are no longer allowed.