parse role mentions

This commit is contained in:
ouwou
2022-02-20 01:19:18 -05:00
parent 6c54296ba3
commit a0599ab812
4 changed files with 55 additions and 2 deletions

View File

@@ -12,3 +12,11 @@ void from_json(const nlohmann::json &j, RoleData &m) {
JS_D("managed", m.IsManaged);
JS_D("mentionable", m.IsMentionable);
}
bool RoleData::HasColor() const noexcept {
return Color != 0;
}
Glib::ustring RoleData::GetEscapedName() const {
return Glib::Markup::escape_text(Name);
}