twilio-professional-services/flex-project-template

[HELP NEEDED] - Conditionally Adding Content to MessageBubble Component

mster429 opened this issue · 1 comments

In my usecase I need to add an additional component (a simple button) to the MessageBubble component

  • It should only be available on the most recently added message
  • Should appear only for the flex agent sent messages not on the customer (Simply it should be available only for the last message on the right side of the flex message view)

Tried adding it with following but it shows on every MessageBubble component as it should :)

flex.MessageListItem.Bubble.Content.add(
         <DeleteButton key="delete-message"/>
)

I need help with the first point.
Any help in this matter is really appreciated

Thanks

Could implement it using the defaultprops in the MessageListItem Component. message