Class AttachmentFilter

  • All Implemented Interfaces:

    
    public final class AttachmentFilter
    
                        

    A filter that is used to filter out attachments that will not be accepted by the backend.

    Clients are able to modify the upload configuration in the dashboard and specify what types of files and images they want to allow or block from being uploaded.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
      AttachmentFilter(ChatClient chatClient)
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final List<AttachmentMetaData> filterAttachments(List<AttachmentMetaData> attachments) Filters out attachments that can be uploaded to the backend according to files and images upload configurations.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AttachmentFilter

        AttachmentFilter(ChatClient chatClient)
        Parameters:
        chatClient - An instance of the low level chat client to fetch upload config.
    • Method Detail

      • filterAttachments

         final List<AttachmentMetaData> filterAttachments(List<AttachmentMetaData> attachments)

        Filters out attachments that can be uploaded to the backend according to files and images upload configurations.

        Parameters:
        attachments - A list of attachments.
        Returns:

        A list of attachments allowed by the server.