Skip to content

Using CustomStartChat removes the composer and file attachment in UI #332

@Kowareyasuki

Description

@Kowareyasuki

When I use the amazon_connect('customStartChat', async function(callback) {} the default composer with markdown formatter, file attachment disappeared even though I included all messaging types and left composer untouched.

Image

but when i commented this customStartChat it returns

Image

the code for my customStartChat api basically just this

    def start_chat_contact(self, participant_name: str) -> dict[str]:
        
        start_chat_response = self.connect_client.start_chat_contact(
            InstanceId=self.INSTANCE_ID,
            ContactFlowId=self.CONTACT_FLOW_ID,
            ParticipantDetails={
                'DisplayName': participant_name
            },
            Attributes={
                'ClientId': self.client_id,
                'Channel': 'CHAT'
            },
            # InitialMessage={"ContentType": "text/plain", "Content": "INITIAL CHAT"},
            ChatDurationInMinutes=3600,
            SupportedMessagingContentTypes=[ 'text/plain', 'text/markdown', 'application/vnd.amazonaws.connect.message.interactive', 'application/vnd.amazonaws.connect.message.interactive.response' ]
            # InitialMessage={
            #     'ContentType': 'text/plain',
            #     'Content': message_text
            # }
        )

        contact_id = start_chat_response['ContactId']
        participant_token = start_chat_response['ParticipantToken']
        participant_id = start_chat_response['ParticipantId']
        logger.info("chat response: %s", start_chat_response)

        return {
            "startChatResult": {
                "ContactId": contact_id, 
                "ParticipantToken": participant_token, 
                "ParticipantId": participant_id
            }
        }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions