Skip to content

Commit

Permalink
feat(manager): no forward on single slow
Browse files Browse the repository at this point in the history
  • Loading branch information
fumiama committed Oct 13, 2024
1 parent 339b9db commit 6a03864
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions plugin/manager/slow.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ func collectsend(ctx *zero.Ctx, msgs ...message.MessageSegment) {
lazy, _ := slowsenders.LoadOrStore(id, &syncx.Lazy[*slowdo.Job[*zero.Ctx, message.MessageSegment]]{
Init: func() *slowdo.Job[*zero.Ctx, message.MessageSegment] {
x, err := slowdo.NewJob(time.Second*5, ctx, func(ctx *zero.Ctx, msg []message.MessageSegment) {
if len(msg) == 1 {
ctx.Send(msg)
return
}
m := make(message.Message, len(msg))
for i, item := range msg {
m[i] = message.CustomNode(
Expand Down

0 comments on commit 6a03864

Please sign in to comment.