Filtering Messages
By filtering messages, we can get messages that only match certain criteria:
with the
includingTags
andexcludingTags
parameters you can filter messages based on the tags set (or not set) in each messagewith the
parentId
parameter you can filter messages according to their relationship:if no
parentId
is passed, any message will matchif null
parentId
is passed, search for all messages without a parentif 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 typeif no
type
is passed, any message will matchif an
AmityMessageDataType
is passed, query for all messages with the specific typeAmityMessageDataType.TEXT
for text messagesAmityMessageDataType.IMAGE
for image messagesAmityMessageDataType.FILE
for file messagesAmityMessageDataType.AUDIO
for audio messagesAmityMessageDataType.CUSTOM
for custom messages
Last updated