In a discussion about automatically applying Trust Level (TL) flair in Discourse, merefield initially asks if there’s an out-of-the-box way to enforce TL flair and update it upon user promotion. They consider creating a custom job but later discover they can hook into events like user_promoted and user_added_to_group [2]. Heliosurge suggests using a Theme Component for automatic TL flair, linking to a meta thread. ClawdiaWolf clarifies that if a user’s flair is set to (None), the system automatically displays the highest TL flair from their automatic groups—unless they’re in moderator/admin groups with custom flair, which takes precedence. merefield thanks them and investigates further, noticing that TL flair appears on avatars in the Categories page’s Latest Topics view but not in the standalone Latest Topics view. They attempt to manually render flair using <UserAvatarFlair @user={{topic.creator}} /> in the topic-list-item.hbr template but suspect the component doesn’t work in raw Handlebars templates [7]. They conclude it may be a limitation awaiting Glimmer component support in Discovery Topic Lists [8].
If their flair is set to (None) it will automatically show the highest level flair from the automatic groups they are in.
Basically, if they aren’t in the moderators or admins groups (or you haven’t set flair for those) it will show their highest trust level flair automatically.
If they are a moderator or admin and those groups have flair set it will choose those. Admin will win if in both moderators and admins.
I’m trying to automatically apply Trust Level Flair’s to the Latest Topic list.
Digging a bit more, I can see that Flair is attached fine to the Last Poster Avatar on the Topic List presented on the Categories page (with Latest Topics).
However, they don’t appear on avatars on the standard Latest view.
I dug into the data and cannot see any major difference.
Does anyone know why technically they show up on Categories (with Latest Topics) and not on Latest avatars?
That would be a help.
I’ve even tried passing the User object to the flair component i’ve added to the topic-list-item.hbr template but with no success, e.g.: