Browse Source

s/code/Code/ after reading the gomatrix lib

michaelkaye/respect_rate_limits
Michael Kaye 4 years ago
parent
commit
9353849575
  1. 2
      services/rssbot/rssbot.go

2
services/rssbot/rssbot.go

@ -418,7 +418,7 @@ func (s *Service) sendToRooms(cli types.MatrixClient, feedURL string, feed *gofe
logger.Info("Sending new feed item") logger.Info("Sending new feed item")
for _, roomID := range s.Feeds[feedURL].Rooms { for _, roomID := range s.Feeds[feedURL].Rooms {
if _, err := cli.SendMessageEvent(roomID, mevt.EventMessage, itemToHTML(feed, item)); err != nil { if _, err := cli.SendMessageEvent(roomID, mevt.EventMessage, itemToHTML(feed, item)); err != nil {
if err.code == 429 {
if err.Code == 429 {
return err return err
} else { } else {
logger.WithError(err).WithField("room_id", roomID).Error("Failed to send to room") logger.WithError(err).WithField("room_id", roomID).Error("Failed to send to room")

Loading…
Cancel
Save