Skip to content

Commit

Permalink
Merge branch 'master' into pbe-1666-message-edits
Browse files Browse the repository at this point in the history
  • Loading branch information
totalimmersion authored May 17, 2024
2 parents 2bd0a23 + 5dfade6 commit ae32286
Show file tree
Hide file tree
Showing 6 changed files with 96 additions and 73 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## [8.32.0](https://github.com/GetStream/stream-chat-js/compare/v8.31.0...v8.32.0) (2024-05-16)


### Features

* add support for notifications_muted in queryMembers ([#1296](https://github.com/GetStream/stream-chat-js/issues/1296)) ([7e02ac8](https://github.com/GetStream/stream-chat-js/commit/7e02ac8f9d23fd5ca00c9e2c91b5e18ddb04fffb))


### Bug Fixes

* fix channel.membership type ([#1300](https://github.com/GetStream/stream-chat-js/issues/1300)) ([367cc20](https://github.com/GetStream/stream-chat-js/commit/367cc20a0609a7c144d08c9f5572b0088c45c13e))

## [8.31.0](https://github.com/GetStream/stream-chat-js/compare/v8.30.0...v8.31.0) (2024-05-02)


Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "stream-chat",
"version": "8.31.0",
"version": "8.32.0",
"description": "JS SDK for the Stream Chat API",
"author": "GetStream",
"homepage": "https://getstream.io/chat/",
Expand Down
3 changes: 1 addition & 2 deletions src/channel_state.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Channel } from './channel';
import {
ChannelMemberResponse,
ChannelMembership,
FormatMessageResponse,
Event,
ExtendableGenerics,
Expand Down Expand Up @@ -42,7 +41,7 @@ export class ChannelState<StreamChatGenerics extends ExtendableGenerics = Defaul
watchers: Record<string, UserResponse<StreamChatGenerics>>;
members: Record<string, ChannelMemberResponse<StreamChatGenerics>>;
unreadCount: number;
membership: ChannelMembership<StreamChatGenerics>;
membership: ChannelMemberResponse<StreamChatGenerics>;
last_message_at: Date | null;
/**
* Flag which indicates if channel state contain latest/recent messages or no.
Expand Down
22 changes: 9 additions & 13 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ export type AppSettingsAPIResponse<StreamChatGenerics extends ExtendableGenerics
organization?: string;
permission_version?: string;
policies?: Record<string, Policy[]>;
poll_enabled?: boolean;
push_notifications?: {
offline_only: boolean;
version: string;
Expand Down Expand Up @@ -313,7 +314,7 @@ export type ChannelAPIResponse<StreamChatGenerics extends ExtendableGenerics = D
messages: MessageResponse<StreamChatGenerics>[];
pinned_messages: MessageResponse<StreamChatGenerics>[];
hidden?: boolean;
membership?: ChannelMembership<StreamChatGenerics> | null;
membership?: ChannelMemberResponse<StreamChatGenerics> | null;
pending_messages?: PendingMessageResponse<StreamChatGenerics>[];
read?: ReadResponse<StreamChatGenerics>[];
threads?: ThreadResponse[];
Expand All @@ -331,6 +332,7 @@ export type ChannelMemberAPIResponse<StreamChatGenerics extends ExtendableGeneri
};

export type ChannelMemberResponse<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = {
ban_expires?: string;
banned?: boolean;
channel_role?: Role;
created_at?: string;
Expand Down Expand Up @@ -2042,18 +2044,12 @@ export type ChannelData<
name?: string;
};

export type ChannelMembership<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = {
banned?: boolean;
channel_role?: Role;
created_at?: string;
is_moderator?: boolean;
notifications_muted?: boolean;
role?: string;
shadow_banned?: boolean;
status?: string;
updated_at?: string;
user?: UserResponse<StreamChatGenerics>;
};
/**
* @deprecated Use ChannelMemberResponse instead
*/
export type ChannelMembership<
StreamChatGenerics extends ExtendableGenerics = DefaultGenerics
> = ChannelMemberResponse<StreamChatGenerics>;

export type ChannelMute<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = {
user: UserResponse<StreamChatGenerics>;
Expand Down
Loading

0 comments on commit ae32286

Please sign in to comment.