신뢰 수준 트리거가 신뢰 수준이 변경되기 전에 호출됩니다

I’m working on an additive trust level plugin that adds/deletes from a group depending on membership on a set of other groups (e.g., membership in paid and special also gets you into the paid-special group).

It’s very strange that TL promotions will trigger an :after_save event, but TL demotions do not trigger a :after_destroy event, but I’m working around that with DiscourseEvent.on(:user_promoted)

But that doesn’t work because the trigger gets called before the trust level is updated:

I submitted a PR: https://github.com/pfaffman/discourse/pull/205

1개의 좋아요