Skip to content

Commit

Permalink
feat: consume messages from channels
Browse files Browse the repository at this point in the history
  • Loading branch information
akurilov committed Dec 27, 2023
1 parent 6755719 commit 2e7a863
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion service/messages/channel.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func (cp ChanPostHandler) publish(tgCtx telebot.Context, w model.Writer[*pb.Clou
ackCount, err = w.WriteBatch([]*pb.CloudEvent{evt})
switch {
case ackCount == 0 && errors.Is(err, limits.ErrReached):
cp.Log.Warn("Message daily publishing limit reached.")
cp.Log.Warn(fmt.Sprintf("Message daily publishing limit reached for channel: @%s", tgCtx.Chat().Username))
case ackCount == 1:
err = tgCtx.Send(fmt.Sprintf(msgFmtPublished, evt.Id), telebot.ModeHTML)
}
Expand Down

0 comments on commit 2e7a863

Please sign in to comment.