|  | 
| 1 | 1 | # Changelog - v3 | 
| 2 | 2 | 
 | 
|  | 3 | +## [v3.4.5] (Apr 7 2023) | 
|  | 4 | + | 
|  | 5 | +Features: | 
|  | 6 | + | 
|  | 7 | +* Add a message list filter of UI level in the `Channel` module | 
|  | 8 | +  * Add `Channel.filterMessageList?: (messages: BaseMessage): boolean;`, a UI level filter prop | 
|  | 9 | +    to Channel. This function will be used to filter messages in `<MessageList />` | 
|  | 10 | + | 
|  | 11 | +    example: | 
|  | 12 | +    ```javascript | 
|  | 13 | +    // set your channel URL | 
|  | 14 | +    const channel = ""; | 
|  | 15 | +    export const ChannelWithFilter = () => { | 
|  | 16 | +      const channelFilter = useCallback((message) => { | 
|  | 17 | +        const now = Date.now(); | 
|  | 18 | +        const twoWeeksAgo = now - 1000 * 60 * 60 * 24 * 14; | 
|  | 19 | +        return message.createdAt > twoWeeksAgo; | 
|  | 20 | +      }, []); | 
|  | 21 | +      return ( | 
|  | 22 | +        <Channel | 
|  | 23 | +              channelUrl={channel} | 
|  | 24 | +              filterMessageList={channelFilter} | 
|  | 25 | +            /> | 
|  | 26 | +      ); | 
|  | 27 | +    }; | 
|  | 28 | +    ``` | 
|  | 29 | + | 
|  | 30 | +* Improve structure of message UI for copying | 
|  | 31 | +    Before: | 
|  | 32 | +    * The words inside messages were kept in separate spans | 
|  | 33 | +    * This would lead to unfavourable formatting when pasted in other applications | 
|  | 34 | + | 
|  | 35 | +    After: | 
|  | 36 | +    * Remove span for wrapping simple strings in message body | 
|  | 37 | +    * Urls and Mentions will still be wrapped in spans(for formatting) | 
|  | 38 | +    * Apply new logic & components(TextFragment) to tokenize strings | 
|  | 39 | +    * Improve keys used in rendering inside message, | 
|  | 40 | +      * UUIDs are not the optimal way to improve rendering | 
|  | 41 | +      * Create a composite key with message.updatedAt | 
|  | 42 | +    * Refactor usePaste hook to make mentions work ~ | 
|  | 43 | +    * Fix overflow of long strings | 
|  | 44 | +    * Deprecate `Word` and `convertWordToStringObj` | 
|  | 45 | + | 
|  | 46 | +* Export MessageProvider, a simple provider to avoid prop drilling into Messages | 
|  | 47 | +    Note - this is still in works, but these props will remain | 
|  | 48 | +    * In the future, we will add methods - to this module - to: | 
|  | 49 | +      * Edit & delete callbacks | 
|  | 50 | +      * Menu render options(ACLs) | 
|  | 51 | +      * Reaction configs | 
|  | 52 | +      * This will improve the customizability and remove a lot of prop drilling in Messages | 
|  | 53 | + | 
|  | 54 | +    ``` | 
|  | 55 | +    export type MessageProviderProps = { | 
|  | 56 | +      children: React.ReactNode; | 
|  | 57 | +      message: BaseMessage; | 
|  | 58 | +      isByMe?: boolean; | 
|  | 59 | +    } | 
|  | 60 | + | 
|  | 61 | +    import { MessageProvider, useMessageContext } from '@sendbird/uikit-react/Message/context' | 
|  | 62 | +    ``` | 
|  | 63 | +    Incase if you were using MessageComponents and see error message | 
|  | 64 | +    `useMessageContext must be used within a MessageProvider ` | 
|  | 65 | +    use: `<MessageProvider message={message}><CustomMessage /></MessageProvider>` | 
|  | 66 | + | 
|  | 67 | +* Add a scheduler for calling markAsRead intervally | 
|  | 68 | +  * The `markAsRead` is called on individual channels is un-optimal(causes command ack. error) | 
|  | 69 | +because we have a list of channels that do this | 
|  | 70 | +ideally this should be fixed in server/SDK | 
|  | 71 | +this is a work around for the meantime to un-throttle the customer | 
|  | 72 | + | 
|  | 73 | +Fixes: | 
|  | 74 | +* Set current channel on `ChannelList` when opening channel from the parent message of `Thread` | 
|  | 75 | +  * Issue: The ChannelPreview item is not selected when opening the channel from | 
|  | 76 | +  the ParentMessage of the Thread | 
|  | 77 | +  * Fix: Set activeChannelUrl of ChannelList | 
|  | 78 | +* Detect new lines in safari on the `MessageInput` component | 
|  | 79 | +  * Safari puts `<div>text</div>` for new lines inside content editable div(input) | 
|  | 80 | +  * Other browsers put newline or `br` | 
|  | 81 | + | 
| 3 | 82 | ## [v3.4.4] (Mar 31 2023) | 
|  | 83 | + | 
| 4 | 84 | Features: | 
| 5 | 85 | * Increase default maximum recording time of Voice Message to 10 minutes | 
| 6 | 86 | * Add logger to VoicePlayer, VoiceRecorder, and useSendVoiceMessage hook | 
|  | 
0 commit comments