ConnectApi.​​Message​Segment Class

This class is abstract.

Message segments in a feed item are typed as ConnectApi.MessageSegment. Feed item capabilities are typed as ConnectApi.FeedItemCapability. Record fields are typed as ConnectApi.AbstractRecordField. These classes are all abstract and have several concrete subclasses. At runtime you can use instanceof to check the concrete types of these objects and then safely proceed with the corresponding downcast. When you downcast, you must have a default case that handles unknown subclasses.

Important

Important

The composition of a feed may change between releases. Your code should always be prepared to handle instances of unknown subclasses.

Name Type Description Available Version
text String Text-only rendition of this segment. If a client encounters an unknown message segment type, it can render this value. 28.0
type ConnectApi.​MessageSegment​Type Enum The message segment type. One of these values:
  • EntityLink
  • FieldChange
  • FieldChangeName
  • FieldChangeValue
  • Hashtag
  • InlineImage
  • Link
  • MarkupBegin
  • MarkupEnd
  • Mention
  • MoreChanges
  • ResourceLink
  • Text
28.0
Previous
Next