diff --git a/package/src/components/Channel/Channel.tsx b/package/src/components/Channel/Channel.tsx index fd13f8277e..f44ad45dc2 100644 --- a/package/src/components/Channel/Channel.tsx +++ b/package/src/components/Channel/Channel.tsx @@ -764,17 +764,6 @@ const ChannelWithContext = < useAppStateListener(undefined, handleAppBackground); - /** - * CHANNEL CONSTANTS - */ - const isAdmin = client?.user?.role === 'admin' || channel?.state.membership.role === 'admin'; - - const isModerator = - channel?.state.membership.role === 'channel_moderator' || - channel?.state.membership.role === 'moderator'; - - const isOwner = channel?.state.membership.role === 'owner'; - /** * CHANNEL METHODS */ @@ -2156,10 +2145,7 @@ const ChannelWithContext = < !!(clientChannelConfig?.commands || [])?.some((command) => command.name === 'giphy'), hideDateSeparators, hideStickyDateHeader, - isAdmin, isChannelActive: shouldSyncChannel, - isModerator, - isOwner, lastRead, loadChannelAroundMessage, loading, diff --git a/package/src/components/Channel/hooks/useCreateChannelContext.ts b/package/src/components/Channel/hooks/useCreateChannelContext.ts index b7e3cc4674..3857d0749d 100644 --- a/package/src/components/Channel/hooks/useCreateChannelContext.ts +++ b/package/src/components/Channel/hooks/useCreateChannelContext.ts @@ -15,10 +15,7 @@ export const useCreateChannelContext = < giphyEnabled, hideDateSeparators, hideStickyDateHeader, - isAdmin, isChannelActive, - isModerator, - isOwner, lastRead, loadChannelAroundMessage, loading, @@ -58,10 +55,7 @@ export const useCreateChannelContext = < giphyEnabled, hideDateSeparators, hideStickyDateHeader, - isAdmin, isChannelActive, - isModerator, - isOwner, lastRead, loadChannelAroundMessage, loading, diff --git a/package/src/contexts/channelContext/ChannelContext.tsx b/package/src/contexts/channelContext/ChannelContext.tsx index fbf3b04648..ca99214f8c 100644 --- a/package/src/contexts/channelContext/ChannelContext.tsx +++ b/package/src/contexts/channelContext/ChannelContext.tsx @@ -59,18 +59,6 @@ export type ChannelContextValue< */ hideDateSeparators: boolean; hideStickyDateHeader: boolean; - /** - * Returns true if the current user has admin privileges - */ - isAdmin: boolean; - /** - * Returns true if the current user is a moderator - */ - isModerator: boolean; - /** - * Returns true if the current user is a owner - */ - isOwner: boolean; /** * Loads channel around a specific message *