1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-16 12:02:54 +08:00

Make isMentioning static

This commit is contained in:
Craftplacer 2020-02-07 16:51:37 +01:00
parent 7cd228db07
commit dd86443264

View File

@ -130,7 +130,7 @@ namespace osu.Game.Online.Chat
/// Checks if <paramref name="message"/> contains <paramref name="username"/>, if not, retries making spaces into underscores. /// Checks if <paramref name="message"/> contains <paramref name="username"/>, if not, retries making spaces into underscores.
/// </summary> /// </summary>
/// <returns>If the <paramref name="message"/> mentions the <paramref name="username"/></returns> /// <returns>If the <paramref name="message"/> mentions the <paramref name="username"/></returns>
private bool isMentioning(string message, string username) => message.IndexOf(username, StringComparison.OrdinalIgnoreCase) != -1 || message.IndexOf(username.Replace(' ', '_'), StringComparison.OrdinalIgnoreCase) != -1; private static bool isMentioning(string message, string username) => message.IndexOf(username, StringComparison.OrdinalIgnoreCase) != -1 || message.IndexOf(username.Replace(' ', '_'), StringComparison.OrdinalIgnoreCase) != -1;
public class PrivateMessageNotification : SimpleNotification public class PrivateMessageNotification : SimpleNotification
{ {