stream-chat-angular 4.43.0 → 4.44.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/version.d.ts +1 -1
- package/bundles/stream-chat-angular.umd.js +25 -6
- package/bundles/stream-chat-angular.umd.js.map +1 -1
- package/esm2015/assets/version.js +2 -2
- package/esm2015/lib/channel.service.js +18 -4
- package/esm2015/lib/types.js +1 -1
- package/fesm2015/stream-chat-angular.js +18 -4
- package/fesm2015/stream-chat-angular.js.map +1 -1
- package/lib/channel.service.d.ts +9 -1
- package/lib/types.d.ts +8 -0
- package/package.json +1 -1
- package/src/assets/version.ts +1 -1
package/lib/channel.service.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { Observable } from 'rxjs';
|
|
|
3
3
|
import { Attachment, Channel, ChannelFilters, ChannelOptions, ChannelResponse, ChannelSort, Event, MessageResponse, UserResponse } from 'stream-chat';
|
|
4
4
|
import { ChatClientService, ClientEvent } from './chat-client.service';
|
|
5
5
|
import { NotificationService } from './notification.service';
|
|
6
|
-
import { AttachmentUpload, ChannelQueryState, DefaultStreamChatGenerics, MessageReactionType, StreamMessage } from './types';
|
|
6
|
+
import { AttachmentUpload, ChannelQueryState, DefaultStreamChatGenerics, MessageInput, MessageReactionType, StreamMessage } from './types';
|
|
7
7
|
import * as i0 from "@angular/core";
|
|
8
8
|
/**
|
|
9
9
|
* The `ChannelService` provides data and interaction for the channel list and message list.
|
|
@@ -165,6 +165,14 @@ export declare class ChannelService<T extends DefaultStreamChatGenerics = Defaul
|
|
|
165
165
|
* The provided method will be called before deleting a message. If the returned Promise resolves to `true` to deletion will go ahead. If `false` is returned, the message won't be deleted.
|
|
166
166
|
*/
|
|
167
167
|
messageDeleteConfirmationHandler?: (message: StreamMessage<T>) => Promise<boolean>;
|
|
168
|
+
/**
|
|
169
|
+
* The provided method will be called before a new message is sent to Stream's API. You can use this hook to tranfrom or enrich the message being sent.
|
|
170
|
+
*/
|
|
171
|
+
beforeSendMessage?: (input: MessageInput<T>) => MessageInput<T> | Promise<MessageInput<T>>;
|
|
172
|
+
/**
|
|
173
|
+
* The provided method will be called before a message is sent to Stream's API for update. You can use this hook to tranfrom or enrich the message being updated.
|
|
174
|
+
*/
|
|
175
|
+
beforeUpdateMessage?: (message: StreamMessage<T>) => StreamMessage<T> | Promise<StreamMessage<T>>;
|
|
168
176
|
private channelsSubject;
|
|
169
177
|
private activeChannelSubject;
|
|
170
178
|
private activeChannelMessagesSubject;
|
package/lib/types.d.ts
CHANGED
|
@@ -246,4 +246,12 @@ export declare type ChannelQueryState = {
|
|
|
246
246
|
state: 'in-progress' | 'success' | 'error';
|
|
247
247
|
error?: unknown;
|
|
248
248
|
};
|
|
249
|
+
export declare type MessageInput<T extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = {
|
|
250
|
+
text: string;
|
|
251
|
+
attachments: Attachment<T>[];
|
|
252
|
+
mentionedUsers: UserResponse<T>[];
|
|
253
|
+
parentId: string | undefined;
|
|
254
|
+
quotedMessageId: string | undefined;
|
|
255
|
+
customData: undefined | Partial<T['messageType']>;
|
|
256
|
+
};
|
|
249
257
|
export {};
|
package/package.json
CHANGED
package/src/assets/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '4.
|
|
1
|
+
export const version = '4.44.0';
|