# OP的警告未用Staff Color高亮显示

**URL:** <https://meta.discourse.org/t/op-of-warnings-not-highlighted-with-staff-color/380993>\
**Category:** Bug\
**Tags:** fixed\
**Created:** [2025年八月30日 15:32 UTC](https://meta.discourse.org/t/op-of-warnings-not-highlighted-with-staff-color/380993 "2025-08-30T15:32:15Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![awesomerobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awesomerobot/32/142900_2.png) [@awesomerobot](https://meta.discourse.org/u/awesomerobot)\
**Post date:** [2026年六月30日 14:04 UTC](https://meta.discourse.org/t/op-of-warnings-not-highlighted-with-staff-color/380993/6 "2026-06-30T14:04:06Z")

</div>

报告很棒，谢谢，正如你所描述的那样。我正在这里应用修复：

> <https://github.com/discourse/discourse/pull/41293>
>
> Reported here: https://meta.discourse.org/t/official-warning-pm-notification-fea…ture/387448/8?u=awesomerobot
> 
> We had \`isWarning\`, but it wasn't wired up to anything after the glimmer migration so it never activated to add the moderator color to warnings
> https://github.com/discourse/discourse/blob/8dd0a9c73627a782bf163d3f590da5bb67a4bc3c/frontend/discourse/app/components/post.gjs#L436-L437
> 
> this adds the getter so the correct class is added to warning PMs and we get the color 
> 
> Before:
> \<img width="700" alt="image" src="https://github.com/user-attachments/assets/309df242-25b2-4013-910f-31ddafae6ca4" /\>
> 
> 
> 
> After:
> \<img width="700" alt="image" src="https://github.com/user-attachments/assets/fa3139b8-7ce0-48e5-bc8c-345d30f8d99e" /\>
> 
> included a test to avoid future regressions

---

_[View the full topic](https://meta.discourse.org/t/op-of-warnings-not-highlighted-with-staff-color/380993)._
