corp-chat-library-antd-react-socket 1.2.26 → 1.2.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -231,6 +231,9 @@ expected response format:
231
231
  export interface fetchMessageContextPathResponse {
232
232
  "content": {
233
233
  "messages": ChatMessage[],
234
+ "target_id": number,
235
+ "has_more_before": boolean,
236
+ "has_more_after": boolean,
234
237
  "who": "Name Surname",
235
238
  "total": 19
236
239
  },
@@ -11,9 +11,10 @@ import { RefObject } from 'react';
11
11
  */
12
12
  interface hookParams {
13
13
  containerRef: RefObject<HTMLDivElement | null>;
14
- fetchMoreMessages: () => void;
14
+ fetchMoreMessages: () => boolean | void | Promise<boolean | void>;
15
15
  hasMore: boolean;
16
16
  offset: number;
17
+ disabled?: boolean;
17
18
  }
18
- export declare const useInfiniteScrollUp: ({ containerRef, fetchMoreMessages, hasMore, offset, }: hookParams) => void;
19
+ export declare const useInfiniteScrollUp: ({ containerRef, fetchMoreMessages, hasMore, offset, disabled, }: hookParams) => void;
19
20
  export {};
@@ -122,6 +122,7 @@ export interface Chat {
122
122
  who: string;
123
123
  messages: ChatMessage[];
124
124
  total: number;
125
+ hasMoreBefore?: boolean;
125
126
  }
126
127
  export interface ChatMessage {
127
128
  id: number;