Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/pages/api-reference/liveblocks-node.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2855,10 +2855,16 @@ await liveblocks.updateFeedMessage({
roomId: "my-room-id",
feedId: "my-feed-id",
messageId: "my-message-id",

// The message data
data: {
role: "user",
content: "Updated content",
},

// Optional, timestamp in milliseconds. Helps prevents race conditions,
// messages that arrive after a newer message are ignored
updatedAt: Date.now(),
});
```

Expand Down
2 changes: 1 addition & 1 deletion packages/liveblocks-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
},
"sideEffects": false,
"dependencies": {
"@liveblocks/core": "3.14.0",
"@liveblocks/core": "3.18.0",
"async-mutex": "^0.4.0",
"decoders": "^2.9.0",
"itertools": "^2.3.2",
Expand Down
5 changes: 1 addition & 4 deletions packages/liveblocks-server/src/Room.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1844,7 +1844,6 @@ export class Room<RM, SM, CM extends JsonObject, C = undefined> {
this.createFeed({
feedId: addMsg.feedId,
metadata: (addMsg.metadata as Json) ?? {},
timestamp: addMsg.timestamp,
})
);
if (err) {
Expand Down Expand Up @@ -1910,7 +1909,6 @@ export class Room<RM, SM, CM extends JsonObject, C = undefined> {
this.addFeedMessage(addMsg.feedId, {
data: addMsg.data as Json,
id: addMsg.id,
timestamp: addMsg.timestamp,
})
);
if (err) {
Expand All @@ -1933,8 +1931,7 @@ export class Room<RM, SM, CM extends JsonObject, C = undefined> {
this.updateFeedMessage(
updateMsg.feedId,
updateMsg.messageId,
updateMsg.data as Json,
updateMsg.timestamp
updateMsg.data as Json
)
);
if (err) {
Expand Down
2 changes: 1 addition & 1 deletion tools/liveblocks-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"typescript": "^5.9.3"
},
"dependencies": {
"@liveblocks/core": "3.14.0",
"@liveblocks/core": "3.18.0",
"@liveblocks/query-parser": "workspace:^",
"@liveblocks/server": "workspace:^",
"@liveblocks/zenrouter": "^1.0.17",
Expand Down
Loading