@tellescope/chat 1.105.2 → 1.107.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tellescope/chat",
3
- "version": "1.105.2",
3
+ "version": "1.107.0",
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.105.2",
38
- "@tellescope/react-components": "^1.105.2",
39
- "@tellescope/sdk": "^1.105.2",
40
- "@tellescope/types-client": "^1.105.2",
41
- "@tellescope/types-models": "^1.105.2",
37
+ "@tellescope/constants": "^1.107.0",
38
+ "@tellescope/react-components": "^1.107.0",
39
+ "@tellescope/sdk": "^1.107.0",
40
+ "@tellescope/types-client": "^1.107.0",
41
+ "@tellescope/types-models": "^1.107.0",
42
42
  "@tellescope/types-utilities": "^1.69.3",
43
- "@tellescope/utilities": "^1.105.2",
43
+ "@tellescope/utilities": "^1.107.0",
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": "d8c3b68f896976e613b82b97dc9b00c5ceaf1926",
54
+ "gitHead": "bfc8bbd59cf1a00b7cad00b73b71f3a716b60487",
55
55
  "publishConfig": {
56
56
  "access": "public"
57
57
  }
package/src/chat.tsx CHANGED
@@ -50,6 +50,7 @@ import {
50
50
  import {
51
51
  ActivityOptions,
52
52
  formatted_date,
53
+ truncate_string,
53
54
  user_display_name, user_is_active,
54
55
  } from "@tellescope/utilities"
55
56
 
@@ -163,6 +164,8 @@ export const Message = ({
163
164
  const textBGStyle = { ...message.senderId === chatUserId ? sentMessageStyle : receivedMessageStyle }
164
165
  const textStyle = { ...message.senderId === chatUserId ? sentMessageTextStyle : receivedMessageTextStyle }
165
166
 
167
+ const quote = message?.quote?.join(' \n')
168
+
166
169
  if (!message.message) {
167
170
  textBGStyle.backgroundColor = undefined
168
171
  } else {
@@ -200,6 +203,17 @@ export const Message = ({
200
203
  }}>
201
204
  <HTMLMessage html={message.html || message.message.split('\n').join('<br/>')} />
202
205
  </Typography>
206
+ {quote &&
207
+ <Typography title={`Quoting: ${quote}`}
208
+ style={{
209
+ ...textStyle, ...textBGStyle,
210
+ backgroundColor: undefined, color: 'black',
211
+ borderLeft: '1px solid black', borderRadius: 0, borderWidth: 2, marginTop: 2, paddingTop: 1, paddingBottom: 1,
212
+ }}
213
+ >
214
+ {truncate_string(quote, { length: 75, showEllipsis: true })}
215
+ </Typography>
216
+ }
203
217
  {attachments}
204
218
  </Flex>
205
219
  ) : (