Skip to content

Custom attachment types no longer render in Input #2185

@szechyjs

Description

@szechyjs

Which packages are you using?

stream_chat_flutter

On what platforms did you experience the issue?

iOS

What version are you using?

9.7.0

What happened?

It seems like when voice input was added in #2097 it broke the ability to use custom attachment types and render thumbnails through the use of mediaAttachmentBuilder.

d2ac7e7#diff-ffbe83275430891c96aa1dab2c79d8f8cb4188993c24f9e622301ad11aca18b5L91

Steps to reproduce

Follow the tutorial in the docs: https://getstream.io/chat/docs/sdk/flutter/stream_chat_flutter/custom_widgets/adding_custom_attachments/

After pressing the location action/icon, nothing shows up in the input field.

This used to work prior to updating to v9.3

Supporting info to reproduce

It is now hard coded to only allow the following attachment types to use mediaAttachmentBuilder.

AttachmentType.image
AttachmentType.video
AttachmentType.giphy
AttachmentType.audio

The old logic considered anything that wasn't AttachmentType.file to be a media type.

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions