mirror of
https://github.com/ppy/osu.git
synced 2025-01-31 06:52:53 +08:00
Make IsMentioning private
This commit is contained in:
parent
d7a52aa801
commit
48231317d2
@ -119,7 +119,7 @@ namespace osu.Game.Online.Chat
|
|||||||
|
|
||||||
private void checkForMentions(Channel channel, Message message, string username)
|
private void checkForMentions(Channel channel, Message message, string username)
|
||||||
{
|
{
|
||||||
if (!notifyOnMention.Value || !IsMentioning(message.Content, username))
|
if (!notifyOnMention.Value || !isMentioning(message.Content, username))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
var notification = new MentionNotification(message.Sender.Username, channel);
|
var notification = new MentionNotification(message.Sender.Username, channel);
|
||||||
@ -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>
|
||||||
public bool IsMentioning(string message, string username) => message.IndexOf(username, StringComparison.OrdinalIgnoreCase) != -1 || message.IndexOf(username.Replace(' ', '_'), StringComparison.OrdinalIgnoreCase) != -1;
|
private 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
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user