Skip to content

Commit d74d08b

Browse files
LinwenxuanLinwenxuan
authored andcommitted
[OneBot] Fix misc style
1 parent 5278f4f commit d74d08b

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

Lagrange.OneBot/Core/OneBotFriend.cs renamed to Lagrange.OneBot/Core/Entity/OneBotFriend.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using System.Text.Json.Serialization;
22

3-
namespace Lagrange.OneBot.Core;
3+
namespace Lagrange.OneBot.Core.Entity;
44

55
[Serializable]
66
public class OneBotFriend

Lagrange.OneBot/Core/Operation/Info/GetFriendListOperation.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using System.Text.Json.Nodes;
22
using Lagrange.Core;
33
using Lagrange.Core.Common.Interface.Api;
4+
using Lagrange.OneBot.Core.Entity;
45
using Lagrange.OneBot.Core.Entity.Action;
56

67
namespace Lagrange.OneBot.Core.Operation.Info;

Lagrange.OneBot/Utility/OneBotSigner.cs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ namespace Lagrange.OneBot.Utility;
1212

1313
public class OneBotSigner : SignProvider
1414
{
15-
private const string Tag = nameof(OneBotSigner);
1615
private readonly string _signServer;
1716
private readonly ILogger _logger;
1817
private readonly Timer _timer;
@@ -25,11 +24,11 @@ public OneBotSigner(IConfiguration config, ILogger<OneBotSigner> logger)
2524
if (string.IsNullOrEmpty(_signServer))
2625
{
2726
Available = false;
28-
logger.LogWarning($"[{Tag}]: Signature Service is not available, login may be failed");
27+
logger.LogWarning("Signature Service is not available, login may be failed");
2928
}
3029
else
3130
{
32-
logger.LogInformation($"[{Tag}]: Signature Service is successfully established");
31+
logger.LogInformation("Signature Service is successfully established");
3332
}
3433

3534
_timer = new Timer(_ =>
@@ -67,7 +66,7 @@ public OneBotSigner(IConfiguration config, ILogger<OneBotSigner> logger)
6766
Available = false;
6867
_timer.Change(0, 5000);
6968

70-
_logger.LogWarning($"[{Tag}] Failed to get signature, using dummy signature");
69+
_logger.LogWarning("Failed to get signature, using dummy signature");
7170
return new byte[35]; // Dummy signature
7271
}
7372
}
@@ -79,7 +78,7 @@ public override bool Test()
7978
string response = Http.GetAsync($"{_signServer}/ping").GetAwaiter().GetResult();
8079
if (JsonSerializer.Deserialize<JsonObject>(response)?["code"]?.GetValue<int>() == 0)
8180
{
82-
_logger.LogInformation($"[{Tag}] Reconnected to Signature Service successfully");
81+
_logger.LogInformation("Reconnected to Signature Service successfully");
8382
return true;
8483
}
8584
}

0 commit comments

Comments
 (0)