You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**DEPRECATED** use [application settings](https://getstream.io/chat/docs/javascript/app_setting_overview/?language=javascript#file-uploads) instead
84
86
85
87
You can narrow the accepted file types by providing the [accepted types](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#accept). By default every file type is accepted.
Copy file name to clipboardExpand all lines: docusaurus/docs/Angular/services/chat-client.mdx
+8-4Lines changed: 8 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,10 +20,6 @@ Please note that for performance reaasons the client is connected [outside of th
20
20
21
21
Creates a [`StreamChat`](https://github.com/GetStream/stream-chat-js/blob/668b3e5521339f4e14fc657834531b4c8bf8176b/src/client.ts#L124) instance using the provided `apiKey`, and connects a user with the given `userId` and `userToken`. More info about [connecting users](https://getstream.io/chat/docs/javascript/init_and_users/?language=javascript) can be found in the platform documentation.
22
22
23
-
:::important
24
-
Calling the `init` method creates a new [WebSocket connection](https://getstream.io/chat/docs/javascript/init_and_users/?language=javascript#websocket-connections), you should only call it once.
25
-
:::
26
-
27
23
## notification$
28
24
29
25
Emits [`Notification`](https://github.com/GetStream/stream-chat-angular/blob/master/projects/stream-chat-angular/src/lib/chat-client.service.ts) events, the list of [supported events](https://github.com/GetStream/stream-chat-angular/blob/master/projects/stream-chat-angular/src/lib/chat-client.service.ts) can be found on GitHub. The platform documentation covers [events in detail](https://getstream.io/chat/docs/javascript/event_object/?language=javascript).
Emits the current connection state of the user (`online` or `offline`)
34
30
31
+
## appSettings$
32
+
33
+
Emits the current [application settings](https://getstream.io/chat/docs/javascript/app_setting_overview/?language=javascript). Since getting the application settings is an expensive API call and we don't always need the result, this is not initialized by default, you need to call `getApplicationSettings` to load them.
34
+
35
35
## flagMessage
36
36
37
37
Flag the message with the given ID. If you want to know [more about flags](https://getstream.io/chat/docs/javascript/moderation/?language=javascript) check out the platform documentation.
38
38
39
+
## getApplicationSettings
40
+
41
+
Loads the current [application settings](https://getstream.io/chat/docs/javascript/app_setting_overview/?language=javascript), if the application settings have already been loaded, it does nothing.
42
+
39
43
## autcompleteUsers
40
44
41
45
Returns the autocomplete options for application users, sends a [search request](https://getstream.io/chat/docs/javascript/query_users/?language=javascript#querying-using-the-$autocomplete-operator) with the given search term.
| isFileUploadEnabled | boolean | If file upload is enabled, the user can open a file selector from the input. Please note that the user also needs to have the necessary [channel capability](https://getstream.io/chat/docs/javascript/channel_capabilities/?language=javascript). | true |
16
-
| acceptedFileTypes |`string[]`| You can narrow the accepted file types by providing the [accepted types](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#accept). By default every file type is accepted.| undefined |
17
-
| isMultipleFileUploadEnabled | boolean | If true, users can select multiple files to upload. | true |
18
-
| areMentionsEnabled | boolean | If true, users can mention other users in messages. You also [need to use the `AutocompleteTextarea`](../concepts/opt-in-architecure.mdx) for this feature to work. | true |
19
-
| mentionAutocompleteItemTemplate |[`TemplateRef<MentionAutcompleteListItemContext>`](<(https://github.com/GetStream/stream-chat-angular/blob/master/projects/stream-chat-angular/src/lib/types.ts)>)| You can provide your own template for the autocomplete list for user mentions. You also [need to use the `AutocompleteTextarea`](../concepts/opt-in-architecure.mdx) for this feature to work. | - |
20
-
| mentionScope | 'application' or 'channel' | The scope for user mentions, either members of the current channel of members of the application | 'channel' |
| isFileUploadEnabled | boolean | If file upload is enabled, the user can open a file selector from the input. Please note that the user also needs to have the necessary [channel capability](https://getstream.io/chat/docs/javascript/channel_capabilities/?language=javascript). | true |
16
+
| acceptedFileTypes |`string[]`|**DEPRECATED** use [application settings](https://getstream.io/chat/docs/javascript/app_setting_overview/?language=javascript#file-uploads) instead. You can narrow the accepted file types by providing the [accepted types](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#accept). By default every file type is accepted. | undefined |
17
+
| isMultipleFileUploadEnabled | boolean | If true, users can select multiple files to upload. | true |
18
+
| areMentionsEnabled | boolean | If true, users can mention other users in messages. You also [need to use the `AutocompleteTextarea`](../concepts/opt-in-architecure.mdx) for this feature to work. | true |
19
+
| mentionAutocompleteItemTemplate |[`TemplateRef<MentionAutcompleteListItemContext>`](<(https://github.com/GetStream/stream-chat-angular/blob/master/projects/stream-chat-angular/src/lib/types.ts)>)| You can provide your own template for the autocomplete list for user mentions. You also [need to use the `AutocompleteTextarea`](../concepts/opt-in-architecure.mdx) for this feature to work. | - |
20
+
| mentionScope | 'application' or 'channel' | The scope for user mentions, either members of the current channel of members of the application | 'channel' |
21
21
22
22
If any of these set through the input of a [`MessageInput`](../components/message-input.mdx) component, that will be override the corresponding value in the service.
0 commit comments