java.lang.Object
io.github.yvasyliev.telegramforwarderbot.reddit.service.forwarder.PhotoMetadataForwarder
All Implemented Interfaces:
MetadataForwarder

@Service public class PhotoMetadataForwarder extends Object implements MetadataForwarder
Forwards a photo from a Reddit link metadata to a Telegram chat.
  • Constructor Details

    • PhotoMetadataForwarder

      public PhotoMetadataForwarder()
  • Method Details

    • forward

      public void forward(Link.Metadata metadata, boolean hasSpoiler) throws IOException, org.telegram.telegrambots.meta.exceptions.TelegramApiException
      Description copied from interface: MetadataForwarder
      Forwards the metadata of a Reddit link to Telegram.
      Specified by:
      forward in interface MetadataForwarder
      Parameters:
      metadata - the metadata of the Reddit link
      hasSpoiler - indicates whether the link has a spoiler
      Throws:
      IOException - if an I/O error occurs while forwarding
      org.telegram.telegrambots.meta.exceptions.TelegramApiException - if an error occurs while sending the message to Telegram