@@ -7,7 +7,7 @@ import MessageNotification from './MessageNotification';
77import CustomNotification from './CustomNotification' ;
88import ConnectionStatus from './ConnectionStatus' ;
99import MessageListInner from './MessageListInner' ;
10- import { MESSAGE_ACTIONS } from '../Message/utils' ;
10+ import { defaultPinPermissions , MESSAGE_ACTIONS } from '../Message/utils' ;
1111import { checkChannelPropType , smartRender } from '../../utils' ;
1212
1313import { ChannelContext , withTranslationContext } from '../../context' ;
@@ -283,6 +283,7 @@ class MessageList extends PureComponent {
283283 . getMuteUserSuccessNotification ,
284284 getMuteUserErrorNotification : this . props
285285 . getMuteUserErrorNotification ,
286+ pinPermissions : this . props . pinPermissions ,
286287 } }
287288 />
288289 </ div >
@@ -436,6 +437,10 @@ MessageList.propTypes = {
436437 * Available props - https://getstream.github.io/stream-chat-react/#messageinput
437438 * */
438439 additionalMessageInputProps : PropTypes . object ,
440+ /**
441+ * The user roles allowed to pin messages in various channel types
442+ */
443+ pinPermissions : /** @type {PropTypes.Validator<import('types').PinPermissions>> } */ ( PropTypes . object ) ,
439444} ;
440445
441446MessageList . defaultProps = {
@@ -451,6 +456,7 @@ MessageList.defaultProps = {
451456 unsafeHTML : false ,
452457 noGroupByUser : false ,
453458 messageActions : Object . keys ( MESSAGE_ACTIONS ) ,
459+ pinPermissions : defaultPinPermissions ,
454460} ;
455461
456462export default withTranslationContext ( ( props ) => (
0 commit comments