mirror of
https://github.com/wekan/wekan.git
synced 2026-11-24 20:45:00 -05:00
Labels are embedded in the board document, not a separate collection, but the Activities label() helper looked the label id up in the Cards collection and always returned undefined. So the addedLabel/removedLabel webhook and notification params never got a label value and the __label__ token in the message text rendered as a bare, generic "label" with no name. Resolve the label from the already-loaded board via getLabelById, and add a pure labelDisplayName() helper (name -> color -> id fallback) so a nameless label is shown by its color, matching the UI. Add a plain-Node unit test.