@tellescope/chat 1.73.0 → 1.74.1
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/lib/cjs/chat.d.ts +4 -2
- package/lib/cjs/chat.d.ts.map +1 -1
- package/lib/cjs/chat.js +3 -8
- package/lib/cjs/chat.js.map +1 -1
- package/lib/esm/chat.d.ts +4 -2
- package/lib/esm/chat.d.ts.map +1 -1
- package/lib/esm/chat.js +3 -8
- package/lib/esm/chat.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +8 -8
- package/src/chat.tsx +5 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tellescope/chat",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.74.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./lib/cjs/index.js",
|
|
6
6
|
"module": "./lib/esm/index.js",
|
|
@@ -34,13 +34,13 @@
|
|
|
34
34
|
"@fontsource/roboto": "^4.5.1",
|
|
35
35
|
"@mui/icons-material": "^5.0.1",
|
|
36
36
|
"@mui/material": "^5.0.2",
|
|
37
|
-
"@tellescope/constants": "^1.
|
|
38
|
-
"@tellescope/react-components": "^1.
|
|
39
|
-
"@tellescope/sdk": "^1.
|
|
40
|
-
"@tellescope/types-client": "^1.
|
|
41
|
-
"@tellescope/types-models": "^1.
|
|
37
|
+
"@tellescope/constants": "^1.74.1",
|
|
38
|
+
"@tellescope/react-components": "^1.74.1",
|
|
39
|
+
"@tellescope/sdk": "^1.74.1",
|
|
40
|
+
"@tellescope/types-client": "^1.74.1",
|
|
41
|
+
"@tellescope/types-models": "^1.74.1",
|
|
42
42
|
"@tellescope/types-utilities": "^1.69.3",
|
|
43
|
-
"@tellescope/utilities": "^1.
|
|
43
|
+
"@tellescope/utilities": "^1.74.1",
|
|
44
44
|
"@typescript-eslint/eslint-plugin": "^4.33.0",
|
|
45
45
|
"@typescript-eslint/parser": "^4.33.0",
|
|
46
46
|
"eslint": "^7.32.0",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
|
|
52
52
|
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "33696c544888ba2090cefb6941b8509fb6908bde",
|
|
55
55
|
"publishConfig": {
|
|
56
56
|
"access": "public"
|
|
57
57
|
}
|
package/src/chat.tsx
CHANGED
|
@@ -656,11 +656,14 @@ export interface CreateChatRoomProps extends Omit<UserAndEnduserSelectorProps, '
|
|
|
656
656
|
onError?: (e: APIError) => void,
|
|
657
657
|
roomTitle?: string,
|
|
658
658
|
roomType?: ChatRoom['type'],
|
|
659
|
+
aboutEnduserId?: string,
|
|
660
|
+
limitToUsers?: User[],
|
|
659
661
|
}
|
|
660
662
|
export const CreateChatRoom = ({
|
|
661
663
|
roomTitle: defaultRoomTitle = "Group Chat",
|
|
662
664
|
onSuccess, onError,
|
|
663
665
|
roomType,
|
|
666
|
+
aboutEnduserId,
|
|
664
667
|
...props
|
|
665
668
|
} : CreateChatRoomProps) => {
|
|
666
669
|
const [, { createElement: createRoom }] = useChatRooms({ dontFetch: true })
|
|
@@ -675,12 +678,13 @@ export const CreateChatRoom = ({
|
|
|
675
678
|
userIds,
|
|
676
679
|
title: roomTitle,
|
|
677
680
|
type: roomType,
|
|
681
|
+
...aboutEnduserId ? { aboutEnduserId } : {},
|
|
678
682
|
})
|
|
679
683
|
.then(r => {
|
|
680
684
|
onSuccess?.(r)
|
|
681
685
|
})
|
|
682
686
|
.catch(onError)
|
|
683
|
-
}, [createRoom, roomTitle, onSuccess, onError])
|
|
687
|
+
}, [createRoom, roomTitle, onSuccess, onError, aboutEnduserId])
|
|
684
688
|
|
|
685
689
|
return (
|
|
686
690
|
<UserAndEnduserSelector {...props} onSelect={handleCreateRoom}
|