stream-chat
Advanced tools
Comparing version 8.18.0 to 8.18.1
@@ -21,2 +21,7 @@ import { StreamChat } from './client'; | ||
getClient(): StreamChat<StreamChatGenerics>; | ||
/** | ||
* addReply - Adds or updates a latestReplies to the thread | ||
* | ||
* @param {MessageResponse<StreamChatGenerics>} message reply message to be added. | ||
*/ | ||
addReply(message: MessageResponse<StreamChatGenerics>): void; | ||
@@ -23,0 +28,0 @@ updateReply(message: MessageResponse<StreamChatGenerics>): void; |
{ | ||
"name": "stream-chat", | ||
"version": "8.18.0", | ||
"version": "8.18.1", | ||
"description": "JS SDK for the Stream Chat API", | ||
@@ -5,0 +5,0 @@ "author": "GetStream", |
@@ -44,7 +44,9 @@ import { StreamChat } from './client'; | ||
this._client = client; | ||
for (const r of t.read) { | ||
this.read[r.user.id] = { | ||
...r, | ||
last_read: new Date(r.last_read), | ||
}; | ||
if (t.read) { | ||
for (const r of t.read) { | ||
this.read[r.user.id] = { | ||
...r, | ||
last_read: new Date(r.last_read), | ||
}; | ||
} | ||
} | ||
@@ -57,4 +59,13 @@ } | ||
/** | ||
* addReply - Adds or updates a latestReplies to the thread | ||
* | ||
* @param {MessageResponse<StreamChatGenerics>} message reply message to be added. | ||
*/ | ||
addReply(message: MessageResponse<StreamChatGenerics>) { | ||
this.latestReplies = addToMessageList(this.latestReplies, formatMessage(message)); | ||
if (message.parent_id !== this.message.id) { | ||
throw new Error('Message does not belong to this thread'); | ||
} | ||
this.latestReplies = addToMessageList(this.latestReplies, formatMessage(message), true); | ||
} | ||
@@ -82,2 +93,3 @@ | ||
this.updateReply(message); | ||
return; | ||
} | ||
@@ -84,0 +96,0 @@ |
@@ -87,2 +87,3 @@ import FormData from 'form-data'; | ||
unread_count: true, | ||
unread_threads: true, | ||
invisible: true, | ||
@@ -89,0 +90,0 @@ roles: true, |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5533887
58215