Filtering Messages

By filtering messages, we can get messages that only match certain criteria:

  • with the includingTags and excludingTags parameters you can filter messages based on the tags set (or not set) in each message

  • with the parentId parameter you can filter messages according to their relationship:

    • if no parentId is passed, any message will match

    • if null parentId is passed, search for all messages without a parent

    • if a non-null parentId is passed: query for all messages with the parentId as parent

  • with the type parameter you can filter messages according to their type

    • if no type is passed, any message will match

    • if an AmityMessageDataType is passed, query for all messages with the specific type

      • AmityMessageDataType.TEXT for text messages

      • AmityMessageDataType.IMAGE for image messages

      • AmityMessageDataType.FILE for file messages

      • AmityMessageDataType.AUDIO for audio messages

      • AmityMessageDataType.CUSTOM for custom messages

Last updated