Skip to content

Commit

Permalink
Merge pull request #432 from ably/fix/correctly-log-items-in-backfill
Browse files Browse the repository at this point in the history
Fix: Stop logging the result object.
  • Loading branch information
splindsay-92 authored Dec 10, 2024
2 parents 30a2cbc + de118b7 commit 3c051a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions demo/src/containers/Chat/Chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { MessageComponent } from '../../components/MessageComponent';
import { MessageInput } from '../../components/MessageInput';
import { useChatClient, useChatConnection, useMessages, useRoomReactions, useTyping } from '@ably/chat/react';
import { ReactionInput } from '../../components/ReactionInput';
import { ConnectionStatusComponent } from '../../components/ConnectionStatusComponent/ConnectionStatusComponent.tsx';
import { ConnectionStatusComponent } from '../../components/ConnectionStatusComponent';
import { ConnectionStatus, Message, MessageEventPayload, MessageEvents, PaginatedResult, Reaction } from '@ably/chat';

export const Chat = (props: { roomId: string; setRoomId: (roomId: string) => void }) => {
Expand All @@ -20,7 +20,7 @@ export const Chat = (props: { roomId: string; setRoomId: (roomId: string) => voi
if (getPreviousMessages) {
getPreviousMessages({ limit: 50 })
.then((result: PaginatedResult<Message>) => {
chatClient.logger.debug('backfilled messages', result);
chatClient.logger.debug('backfilled messages', result.items);
setMessages(result.items.filter((m) => !m.isDeleted).reverse());
setLoading(false);
})
Expand Down

0 comments on commit 3c051a3

Please sign in to comment.