MessageService

The message service contains configuration options related to displaying the message content

Type parameters

NameType
Textends DefaultStreamChatGenerics = DefaultStreamChatGenerics

Properties

customLinkRenderer

Optional customLinkRenderer: (url: string) => string

You can provide a custom method to display links

Type declaration

▸ (url): string

Parameters
NameTypeDescription
urlstringthe url the link should refer to
Returns

string

Defined in

projects/stream-chat-angular/src/lib/message.service.ts:28


displayAs

displayAs: "html" | "text" = 'text'

Decides if the message content should be formatted as text or HTML

If you display messages as text the following parts are still be displayed as HTML:

Defined in

projects/stream-chat-angular/src/lib/message.service.ts:21


filterCustomAttachment

Optional filterCustomAttachment: (attachment: Attachment<T>) => boolean

The SDK supports the following attachment types: image, file, giphy, video and voiceRecording attachments.

All other types are treated as custom attachments, however it’s possible to override this logic, and provide a custom filtering method which can be used to treat some built-in attachments as custom.

Provide a method which retruns true if an attachment should be considered as custom.

Type declaration

▸ (attachment): boolean

Parameters
NameType
attachmentAttachment<T>
Returns

boolean

Defined in

projects/stream-chat-angular/src/lib/message.service.ts:36

Methods

isCustomAttachment

isCustomAttachment(attachment): boolean

Tells if an attachment is custom (you need to provide your own template to display them) or built-in (the SDK supports it out-of-the-box)

Parameters

NameType
attachmentAttachment<T>

Returns

boolean

true if the attachment is custom

Defined in

projects/stream-chat-angular/src/lib/message.service.ts:45

© Getstream.io, Inc. All Rights Reserved.