新增私聊相关
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
using System.Diagnostics;
|
||||
using Fantasy;
|
||||
using Fantasy.Async;
|
||||
using Fantasy.Network.Interface;
|
||||
|
||||
namespace NB.Chat;
|
||||
|
||||
public class
|
||||
C2S_GetConversationsRequestHandler : RouteRPC<SocialUnit, C2S_GetConversationsRequest, S2C_GetConversationsResponse>
|
||||
{
|
||||
protected override async FTask Run(SocialUnit entity, C2S_GetConversationsRequest request,
|
||||
S2C_GetConversationsResponse response, Action reply)
|
||||
{
|
||||
Stopwatch stopwatch = new Stopwatch();
|
||||
stopwatch.Start();
|
||||
var mailManageComponent = entity.Scene.GetComponent<MailManageComponent>();
|
||||
var list = await mailManageComponent.GetConversations(entity.Id);
|
||||
response.List = await list.ToInfo(entity.Scene, entity.Id);
|
||||
stopwatch.Stop();
|
||||
Log.Info($"查询会话列表耗时={stopwatch.ElapsedMilliseconds}");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user