fix possible bans from Pavel Durov

This commit is contained in:
2024-05-19 22:40:34 +03:00
parent 7002a04d14
commit 1460cb0a75
3 changed files with 15 additions and 6 deletions
+7 -1
View File
@@ -1,12 +1,17 @@
using System.Text;
using System;
using System.Text;
using Telegram.Bot.Types;
namespace Kruzya.TelegramBot.Core.Extensions;
public static class UserExtension
{
[Obsolete("Insecure method, currently replaced to dummy text 'Chat Member'")]
public static string ToHtml(this User user, bool byUsername = false)
{
return "Пользователь";
/**
var text = new StringBuilder();
text.Append($"<a href=\"tg://user?id={user.Id}\">");
@@ -19,6 +24,7 @@ public static class UserExtension
text.Append($"{user.FirstName} {user.LastName}".Trim().HtmlEncode());
}
return text.Append("</a>").ToString();
*/
}
public static string ToLog(this User user)