Skip to content

Commit c6dfd6c

Browse files
committed
feat: integrate stream-chat@rc13
1 parent 3e79600 commit c6dfd6c

File tree

7 files changed

+29
-15
lines changed

7 files changed

+29
-15
lines changed

package-lock.json

+20-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@
129129
"replace": "^1.2.2",
130130
"rxjs": "~7.4.0",
131131
"starwars-names": "^1.6.0",
132-
"stream-chat": "9.0.0-rc.6",
132+
"stream-chat": "9.0.0-rc.13",
133133
"ts-node": "^10.9.2",
134134
"tslib": "^2.3.0",
135135
"uuid": "^9.0.1",

projects/stream-chat-angular/src/lib/channel.service.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ import {
1919
Event,
2020
EventTypes,
2121
FormatMessageResponse,
22+
LocalMessage,
2223
MemberFilters,
2324
Message,
2425
MessageResponse,
2526
ReactionResponse,
26-
UpdatedMessage,
2727
UserResponse,
2828
} from 'stream-chat';
2929
import { ChatClientService, ClientEvent } from './chat-client.service';
@@ -915,7 +915,7 @@ export class ChannelService {
915915
return this.resendMessage(message);
916916
}
917917
const response = await this.chatClientService.chatClient.updateMessage(
918-
messageToUpdate as unknown as UpdatedMessage
918+
messageToUpdate as unknown as LocalMessage
919919
);
920920

921921
const channel = this.channelsSubject

projects/stream-chat-angular/src/lib/get-message-translation.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export const getMessageTranslation = (
1717
(channel?.data?.auto_translation_language as TranslationLanguages);
1818
if (language && message?.i18n && message?.user?.id !== user?.id) {
1919
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions, @typescript-eslint/no-base-to-string
20-
return message.i18n[`${language}_text` as `${TranslationLanguages}_text`];
20+
return message.i18n[`${language}_text`];
2121
} else {
2222
return undefined;
2323
}

projects/stream-chat-angular/src/lib/message-actions-box/message-actions-box.component.spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
} from '@angular/core/testing';
88
import { TranslateModule } from '@ngx-translate/core';
99
import { BehaviorSubject, Observable, of } from 'rxjs';
10-
import { Channel, MessageResponseBase, ReactionResponse } from 'stream-chat';
10+
import { Channel, ReactionResponse } from 'stream-chat';
1111
import { TextareaComponent } from '../message-input/textarea/textarea.component';
1212
import { ChannelService } from '../channel.service';
1313
import { ChatClientService } from '../chat-client.service';
@@ -189,7 +189,7 @@ describe('MessageActionsBoxComponent', () => {
189189
it(`shouldn't disable quote action, if message already has a quoted message`, () => {
190190
component.message = {
191191
...component.message!,
192-
quoted_message: mockMessage() as any as MessageResponseBase,
192+
quoted_message: mockMessage() as any,
193193
};
194194
component.enabledActions = ['quote-message'];
195195
component.ngOnChanges({

projects/stream-chat-angular/src/lib/message/message.component.spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {
55
tick,
66
} from '@angular/core/testing';
77

8-
import { MessageResponseBase, UserResponse } from 'stream-chat';
8+
import { UserResponse } from 'stream-chat';
99
import { StreamMessage } from '../types';
1010
import { LoadingIndicatorComponent } from '../icon/loading-indicator/loading-indicator.component';
1111
import { MessageComponent } from './message.component';
@@ -885,7 +885,7 @@ describe('MessageComponent', () => {
885885
quotedMessage.text = 'This message was quoted';
886886
component.message = {
887887
...component.message!,
888-
quoted_message: quotedMessage as any as MessageResponseBase,
888+
quoted_message: quotedMessage as any,
889889
};
890890
component.ngOnChanges({ message: {} as SimpleChange });
891891
fixture.detectChanges();

projects/stream-chat-angular/src/lib/types-custom.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
export interface DefaultChannelData {
22
image?: string;
3+
name?: string;
34
}
45

56
export interface DefaultAttachmentData {

0 commit comments

Comments
 (0)