完成离线消息发送和上线获取离线消息

This commit is contained in:
2025-08-13 23:44:59 +08:00
parent f8b876ca2f
commit 022cc1ac3e
39 changed files with 499 additions and 85 deletions

View File

@@ -260,6 +260,52 @@ namespace Fantasy
public uint ErrorCode { get; set; }
}
/// <summary>
/// 获取离线时的未读私聊
/// </summary>
[ProtoContract]
public partial class C2Chat_GetOfflineMessageRequest : AMessage, ICustomRouteRequest, IProto
{
public static C2Chat_GetOfflineMessageRequest Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<C2Chat_GetOfflineMessageRequest>();
}
public override void Dispose()
{
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<C2Chat_GetOfflineMessageRequest>(this);
#endif
}
[ProtoIgnore]
public Caht2C_GetOfflineMessageResponse ResponseType { get; set; }
public uint OpCode() { return OuterOpcode.C2Chat_GetOfflineMessageRequest; }
[ProtoIgnore]
public int RouteType => Fantasy.RouteType.ChatRoute;
}
/// <summary>
/// 发送聊天响应
/// </summary>
[ProtoContract]
public partial class Caht2C_GetOfflineMessageResponse : AMessage, ICustomRouteResponse, IProto
{
public static Caht2C_GetOfflineMessageResponse Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<Caht2C_GetOfflineMessageResponse>();
}
public override void Dispose()
{
ErrorCode = default;
Message.Clear();
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<Caht2C_GetOfflineMessageResponse>(this);
#endif
}
public uint OpCode() { return OuterOpcode.Caht2C_GetOfflineMessageResponse; }
[ProtoMember(1)]
public List<ChatMessageInfo> Message = new List<ChatMessageInfo>();
[ProtoMember(2)]
public uint ErrorCode { get; set; }
}
/// <summary>
/// 推送消息
/// </summary>
[ProtoContract]