Fix lang store (#115)

Signed-off-by: Kristina Fefelova <kristin.fefelova@gmail.com>
This commit is contained in:
Kristina
2025-10-10 01:00:37 +04:00
committed by GitHub
parent 5a50e4b54d
commit cbe741217d
15 changed files with 73 additions and 51 deletions
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@hcengineering/communication-server",
"comment": "fix language store",
"type": "patch"
}
],
"packageName": "@hcengineering/communication-server"
}
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@hcengineering/communication-shared",
"comment": "Fix update patch event apply",
"type": "patch"
}
],
"packageName": "@hcengineering/communication-shared"
}
+19 -19
View File
@@ -13,13 +13,13 @@ importers:
../../packages/client-query:
dependencies:
'@hcengineering/communication-query':
specifier: workspace:^0.7.1
specifier: workspace:^0.7.2
version: link:../query
'@hcengineering/communication-sdk-types':
specifier: workspace:^0.7.1
specifier: workspace:^0.7.2
version: link:../sdk-types
'@hcengineering/communication-types':
specifier: workspace:^0.7.1
specifier: workspace:^0.7.2
version: link:../types
'@hcengineering/hulylake-client':
specifier: ^0.7.1
@@ -71,13 +71,13 @@ importers:
../../packages/cockroach:
dependencies:
'@hcengineering/communication-sdk-types':
specifier: workspace:^0.7.1
specifier: workspace:^0.7.2
version: link:../sdk-types
'@hcengineering/communication-shared':
specifier: workspace:^0.7.1
specifier: workspace:^0.7.2
version: link:../shared
'@hcengineering/communication-types':
specifier: workspace:^0.7.1
specifier: workspace:^0.7.2
version: link:../types
postgres:
specifier: ^3.4.7
@@ -132,13 +132,13 @@ importers:
../../packages/query:
dependencies:
'@hcengineering/communication-sdk-types':
specifier: workspace:^0.7.1
specifier: workspace:^0.7.2
version: link:../sdk-types
'@hcengineering/communication-shared':
specifier: workspace:^0.7.1
specifier: workspace:^0.7.2
version: link:../shared
'@hcengineering/communication-types':
specifier: workspace:^0.7.1
specifier: workspace:^0.7.2
version: link:../types
'@hcengineering/hulylake-client':
specifier: ^0.7.1
@@ -196,13 +196,13 @@ importers:
../../packages/rest-client:
dependencies:
'@hcengineering/communication-sdk-types':
specifier: workspace:^0.7.1
specifier: workspace:^0.7.2
version: link:../sdk-types
'@hcengineering/communication-shared':
specifier: workspace:^0.7.1
specifier: workspace:^0.7.2
version: link:../shared
'@hcengineering/communication-types':
specifier: workspace:^0.7.1
specifier: workspace:^0.7.2
version: link:../types
'@hcengineering/core':
specifier: ^0.7.1
@@ -257,7 +257,7 @@ importers:
../../packages/sdk-types:
dependencies:
'@hcengineering/communication-types':
specifier: workspace:^0.7.1
specifier: workspace:^0.7.2
version: link:../types
'@hcengineering/core':
specifier: ^0.7.1
@@ -309,16 +309,16 @@ importers:
specifier: ^0.7.1
version: 0.7.1
'@hcengineering/communication-cockroach':
specifier: workspace:^0.7.1
specifier: workspace:^0.7.2
version: link:../cockroach
'@hcengineering/communication-sdk-types':
specifier: workspace:^0.7.1
specifier: workspace:^0.7.2
version: link:../sdk-types
'@hcengineering/communication-shared':
specifier: workspace:^0.7.1
specifier: workspace:^0.7.2
version: link:../shared
'@hcengineering/communication-types':
specifier: workspace:^0.7.1
specifier: workspace:^0.7.2
version: link:../types
'@hcengineering/core':
specifier: ^0.7.1
@@ -391,10 +391,10 @@ importers:
../../packages/shared:
dependencies:
'@hcengineering/communication-sdk-types':
specifier: workspace:^0.7.1
specifier: workspace:^0.7.2
version: link:../sdk-types
'@hcengineering/communication-types':
specifier: workspace:^0.7.1
specifier: workspace:^0.7.2
version: link:../types
'@hcengineering/hulylake-client':
specifier: ^0.7.1
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@hcengineering/scripts",
"version": "0.7.1",
"version": "0.7.2",
"scripts": {
"format": "echo \"No format specified\""
},
+4 -4
View File
@@ -1,6 +1,6 @@
{
"name": "@hcengineering/communication-client-query",
"version": "0.7.1",
"version": "0.7.2",
"main": "lib/index.js",
"svelte": "src/index.ts",
"types": "types/index.d.ts",
@@ -35,9 +35,9 @@
"typescript": "^5.8.3"
},
"dependencies": {
"@hcengineering/communication-types": "workspace:^0.7.1",
"@hcengineering/communication-sdk-types": "workspace:^0.7.1",
"@hcengineering/communication-query": "workspace:^0.7.1",
"@hcengineering/communication-types": "workspace:^0.7.2",
"@hcengineering/communication-sdk-types": "workspace:^0.7.2",
"@hcengineering/communication-query": "workspace:^0.7.2",
"@hcengineering/hulylake-client": "^0.7.1",
"fast-equals": "^5.2.2"
},
+4 -4
View File
@@ -1,6 +1,6 @@
{
"name": "@hcengineering/communication-cockroach",
"version": "0.7.1",
"version": "0.7.2",
"main": "lib/index.js",
"svelte": "src/index.ts",
"types": "types/index.d.ts",
@@ -36,9 +36,9 @@
"@types/uuid": "^8.3.1"
},
"dependencies": {
"@hcengineering/communication-types": "workspace:^0.7.1",
"@hcengineering/communication-sdk-types": "workspace:^0.7.1",
"@hcengineering/communication-shared": "workspace:^0.7.1",
"@hcengineering/communication-types": "workspace:^0.7.2",
"@hcengineering/communication-sdk-types": "workspace:^0.7.2",
"@hcengineering/communication-shared": "workspace:^0.7.2",
"postgres": "^3.4.7",
"uuid": "^8.3.2"
},
+4 -4
View File
@@ -1,6 +1,6 @@
{
"name": "@hcengineering/communication-query",
"version": "0.7.1",
"version": "0.7.2",
"main": "lib/index.js",
"svelte": "src/index.ts",
"types": "types/index.d.ts",
@@ -36,9 +36,9 @@
"@types/uuid": "^8.3.1"
},
"dependencies": {
"@hcengineering/communication-sdk-types": "workspace:^0.7.1",
"@hcengineering/communication-shared": "workspace:^0.7.1",
"@hcengineering/communication-types": "workspace:^0.7.1",
"@hcengineering/communication-sdk-types": "workspace:^0.7.2",
"@hcengineering/communication-shared": "workspace:^0.7.2",
"@hcengineering/communication-types": "workspace:^0.7.2",
"@hcengineering/hulylake-client": "^0.7.1",
"fast-equals": "^5.2.2",
"uuid": "^8.3.2"
+4 -4
View File
@@ -1,6 +1,6 @@
{
"name": "@hcengineering/communication-rest-client",
"version": "0.7.1",
"version": "0.7.2",
"main": "lib/index.js",
"svelte": "src/index.ts",
"types": "types/index.d.ts",
@@ -36,9 +36,9 @@
"@types/snappyjs": "^0.7.1"
},
"dependencies": {
"@hcengineering/communication-types": "workspace:^0.7.1",
"@hcengineering/communication-sdk-types": "workspace:^0.7.1",
"@hcengineering/communication-shared": "workspace:^0.7.1",
"@hcengineering/communication-types": "workspace:^0.7.2",
"@hcengineering/communication-sdk-types": "workspace:^0.7.2",
"@hcengineering/communication-shared": "workspace:^0.7.2",
"@hcengineering/core": "^0.7.1",
"snappyjs": "^0.7.0"
},
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@hcengineering/communication-sdk-types",
"version": "0.7.1",
"version": "0.7.2",
"main": "lib/index.js",
"svelte": "src/index.ts",
"types": "types/index.d.ts",
@@ -36,7 +36,7 @@
},
"dependencies": {
"@hcengineering/core": "^0.7.1",
"@hcengineering/communication-types": "workspace:^0.7.1"
"@hcengineering/communication-types": "workspace:^0.7.2"
},
"repository": {
"type": "git",
+5 -5
View File
@@ -1,6 +1,6 @@
{
"name": "@hcengineering/communication-server",
"version": "0.7.1",
"version": "0.7.2",
"main": "lib/index.js",
"svelte": "src/index.ts",
"types": "types/index.d.ts",
@@ -37,10 +37,10 @@
},
"dependencies": {
"@hcengineering/account-client": "^0.7.1",
"@hcengineering/communication-cockroach": "workspace:^0.7.1",
"@hcengineering/communication-sdk-types": "workspace:^0.7.1",
"@hcengineering/communication-shared": "workspace:^0.7.1",
"@hcengineering/communication-types": "workspace:^0.7.1",
"@hcengineering/communication-cockroach": "workspace:^0.7.2",
"@hcengineering/communication-sdk-types": "workspace:^0.7.2",
"@hcengineering/communication-shared": "workspace:^0.7.2",
"@hcengineering/communication-types": "workspace:^0.7.2",
"@hcengineering/core": "^0.7.1",
"@hcengineering/server-token": "^0.7.1",
"@hcengineering/text-core": "^0.7.1",
+2 -1
View File
@@ -543,9 +543,10 @@ export class Blob {
private serializeMessage (message: Message): MessageDoc {
return {
...message,
language: message.language ?? null,
extra: message.extra ?? {},
created: message.created.toISOString(),
modified: message.modified?.toISOString(),
modified: message.modified?.toISOString() ?? null,
reactions: {},
attachments: {},
threads: {}
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@hcengineering/communication-shared",
"version": "0.7.1",
"version": "0.7.2",
"main": "lib/index.js",
"svelte": "src/index.ts",
"types": "types/index.d.ts",
@@ -35,8 +35,8 @@
"typescript": "^5.8.3"
},
"dependencies": {
"@hcengineering/communication-types": "workspace:^0.7.1",
"@hcengineering/communication-sdk-types": "workspace:^0.7.1",
"@hcengineering/communication-types": "workspace:^0.7.2",
"@hcengineering/communication-sdk-types": "workspace:^0.7.2",
"@hcengineering/hulylake-client": "^0.7.1"
},
"repository": {
+2 -1
View File
@@ -141,9 +141,10 @@ function applyPatchEvent (message: Message, event: PatchEvent): Message | undefi
if (date.getTime() < (message.modified?.getTime() ?? 0)) {
return message
}
const shouldUpdateDate = event.content != null || event.extra != null
return {
...message,
modified: date,
modified: shouldUpdateDate ? date : message.modified,
content: event.content ?? message.content,
extra: event.extra ?? message.extra,
language: event.language ?? message.language
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@hcengineering/communication-types",
"version": "0.7.1",
"version": "0.7.2",
"main": "lib/index.js",
"svelte": "src/index.ts",
"types": "types/index.d.ts",
+2 -2
View File
@@ -32,8 +32,8 @@ export interface MessageDoc {
type: MessageType
content: Markdown
extra: MessageExtra
language?: string | null
modified?: string | null // ISO date
language: string | null
modified: string | null // ISO date
reactions: Record<Emoji, Record<PersonUuid, { count: number, date: string }>>
attachments: Record<AttachmentID, AttachmentDoc>