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