Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Core] Construct ForwardEntity with a single sequence #737

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Wesley-Young
Copy link
Contributor

  • Added a new constructor ForwardEntity(uint sequence)
  • Added a new method Forward(uint sequence) to MessageBuilder

Copy link
Contributor

@DarkRRb DarkRRb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Throw:

trce: Lagrange.OneBot.Core.Network.Service.ForwardWSService[12]
      Receive(d337a034-17a0-4b30-ba32-cece9e5ad8eb) {"action":"send_group_msg","params":{"group_id":894446744,"message":[{"type":"reply","data":{"id":"-761034950"}},{"type":"text","data":{"text":"test"}}]}}
warn: Lagrange.Core.BotContext[0]
      [2025-02-08 07:42:36] [BusinessContext] [WARNING]: Error when processing the event: Lagrange.Core.Internal.Event.Message.SendMessageEvent
warn: Lagrange.Core.BotContext[0]
      [2025-02-08 07:42:36] [BusinessContext] [WARNING]: System.ArgumentOutOfRangeException: The UTC time represented when the offset is applied must be between year 0 and 10,000. (Parameter 'offset')
         at System.DateTimeOffset.ValidateDate(DateTime dateTime, TimeSpan offset)
         at System.DateTimeOffset..ctor(DateTime dateTime)
         at Lagrange.Core.Message.Entity.ForwardEntity.Lagrange.Core.Message.IMessageEntity.PackElement() in D:\.code\dotnet\Lagrange\Lagrange.Core\Lagrange.Core\Message\Entity\ForwardEntity.cs:line 71
         at Lagrange.Core.Message.MessagePacker.Build(MessageChain chain, String selfUid) in D:\.code\dotnet\Lagrange\Lagrange.Core\Lagrange.Core\Message\MessagePacker.cs:line 63
         at Lagrange.Core.Internal.Service.Message.SendMessageService.Build(SendMessageEvent input, BotKeystore keystore, BotAppInfo appInfo, BotDeviceInfo device, Span`1& output, List`1& extraPackets) in D:\.code\dotnet\Lagrange\Lagrange.Core\Lagrange.Core\Internal\Service\Message\SendMessageService.cs:line 18
         at Lagrange.Core.Internal.Service.BaseService`1.Lagrange.Core.Internal.Service.IService.Build(ProtocolEvent 
input, BotKeystore keystore, BotAppInfo appInfo, BotDeviceInfo device, Span`1& output, List`1& extraPackets) in D:\.code\dotnet\Lagrange\Lagrange.Core\Lagrange.Core\Internal\Service\BaseService.cs:line 32
         at Lagrange.Core.Internal.Context.ServiceContext.ResolvePacketByEvent(ProtocolEvent protocolEvent) in D:\.code\dotnet\Lagrange\Lagrange.Core\Lagrange.Core\Internal\Context\ServiceContext.cs:line 69
         at Lagrange.Core.Internal.Context.BusinessContext.SendEvent(ProtocolEvent event) in D:\.code\dotnet\Lagrange\Lagrange.Core\Lagrange.Core\Internal\Context\BusinessContext.cs:line 101

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants