feat(plugin): add fluff category support
This commit is contained in:
parent
fc89e7df79
commit
6d91a8ab0c
|
@ -13,6 +13,7 @@ namespace NoSoliciting.Ml {
|
|||
Static,
|
||||
Community,
|
||||
StaticSub,
|
||||
Fluff,
|
||||
}
|
||||
|
||||
public static class MessageCategoryExt {
|
||||
|
@ -26,6 +27,7 @@ namespace NoSoliciting.Ml {
|
|||
MessageCategory.Static,
|
||||
MessageCategory.StaticSub,
|
||||
MessageCategory.Community,
|
||||
MessageCategory.Fluff,
|
||||
};
|
||||
|
||||
public static MessageCategory? FromString(string? category) => category switch {
|
||||
|
@ -39,6 +41,7 @@ namespace NoSoliciting.Ml {
|
|||
"STATIC" => MessageCategory.Static,
|
||||
"COMMUNITY" => MessageCategory.Community,
|
||||
"STATIC_SUB" => MessageCategory.StaticSub,
|
||||
"FLUFF" => MessageCategory.Fluff,
|
||||
_ => null,
|
||||
};
|
||||
|
||||
|
@ -54,6 +57,7 @@ namespace NoSoliciting.Ml {
|
|||
"Static recruitment" => MessageCategory.Static,
|
||||
"Community ads" => MessageCategory.Community,
|
||||
"Static substitutes" => MessageCategory.StaticSub,
|
||||
"Fluff" => MessageCategory.Fluff,
|
||||
_ => null,
|
||||
};
|
||||
#endif
|
||||
|
@ -69,6 +73,7 @@ namespace NoSoliciting.Ml {
|
|||
MessageCategory.Static => "STATIC",
|
||||
MessageCategory.Community => "COMMUNITY",
|
||||
MessageCategory.StaticSub => "STATIC_SUB",
|
||||
MessageCategory.Fluff => "FLUFF",
|
||||
_ => throw new ArgumentException("Invalid category", nameof(category)),
|
||||
};
|
||||
|
||||
|
@ -83,6 +88,7 @@ namespace NoSoliciting.Ml {
|
|||
MessageCategory.Static => Language.StaticCategory,
|
||||
MessageCategory.Community => Language.CommunityCategory,
|
||||
MessageCategory.StaticSub => Language.StaticSubCategory,
|
||||
MessageCategory.Fluff => Language.FluffCategory,
|
||||
_ => throw new ArgumentException("Invalid category", nameof(category)),
|
||||
};
|
||||
|
||||
|
@ -97,6 +103,7 @@ namespace NoSoliciting.Ml {
|
|||
MessageCategory.Static => Language.StaticDescription,
|
||||
MessageCategory.Community => Language.CommunityDescription,
|
||||
MessageCategory.StaticSub => Language.StaticSubDescription,
|
||||
MessageCategory.Fluff => Language.FluffDescription,
|
||||
_ => throw new ArgumentException("Invalid category", nameof(category)),
|
||||
};
|
||||
}
|
||||
|
|
|
@ -75,6 +75,9 @@ namespace NoSoliciting {
|
|||
[MessageCategory.Community] = new HashSet<ChatType> {
|
||||
ChatType.None,
|
||||
},
|
||||
[MessageCategory.Fluff] = new HashSet<ChatType> {
|
||||
ChatType.None,
|
||||
},
|
||||
};
|
||||
|
||||
public bool LogFilteredPfs { get; set; } = true;
|
||||
|
|
|
@ -159,6 +159,24 @@ namespace NoSoliciting.Resources {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Fluff.
|
||||
/// </summary>
|
||||
internal static string FluffCategory {
|
||||
get {
|
||||
return ResourceManager.GetString("FluffCategory", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Messages that don't full into other categories and are not for content (Party Finder).
|
||||
/// </summary>
|
||||
internal static string FluffDescription {
|
||||
get {
|
||||
return ResourceManager.GetString("FluffDescription", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Free Company ads.
|
||||
/// </summary>
|
||||
|
|
|
@ -276,4 +276,10 @@
|
|||
<data name="ReportModalClassificationOtherDescription" xml:space="preserve">
|
||||
<value>Messages that don't fall under any of the other categories.</value>
|
||||
</data>
|
||||
<data name="FluffCategory" xml:space="preserve">
|
||||
<value>Fluff</value>
|
||||
</data>
|
||||
<data name="FluffDescription" xml:space="preserve">
|
||||
<value>Messages that don't full into other categories and are not for content (Party Finder)</value>
|
||||
</data>
|
||||
</root>
|
||||
|
|
Loading…
Reference in New Issue