fix: properly update pulse typing sub (#9875)

Signed-off-by: Alexander Onnikov <Alexander.Onnikov@xored.com>
This commit is contained in:
Alexander Onnikov
2025-09-17 08:08:35 +07:00
committed by GitHub
parent 6a786497a2
commit 40f46d9c43
4 changed files with 15 additions and 7 deletions
+1
View File
@@ -295,6 +295,7 @@ export async function configurePlatform (onWorkbenchConnect?: () => Promise<void
setMetadata(presentation.metadata.MailUrl, config.MAIL_URL)
setMetadata(recorder.metadata.StreamUrl, config.STREAM_URL ?? '')
setMetadata(presentation.metadata.StatsUrl, config.STATS_URL)
setMetadata(presentation.metadata.PulseUrl, config.PULSE_URL ?? '')
setMetadata(textEditor.metadata.Collaborator, config.COLLABORATOR ?? '')
+1
View File
@@ -53,6 +53,7 @@ export interface Config {
MAIL_URL?: string
COMMUNICATION_API_ENABLED?: string
BILLING_URL?: string
PULSE_URL?: string
PASSWORD_STRICTNESS?: 'very_strict' | 'strict' | 'normal' | 'none'
EXCLUDED_APPLICATIONS_FOR_ANONYMOUS?: string
}
@@ -13,7 +13,7 @@
// limitations under the License.
-->
<script lang="ts">
import { onDestroy, onMount } from 'svelte'
import { onDestroy } from 'svelte'
import chunter from '@hcengineering/chunter'
import { getName, getCurrentEmployee, Person } from '@hcengineering/contact'
import { getPersonsByPersonRefs } from '@hcengineering/contact-resources'
@@ -62,9 +62,12 @@
let unsubscribe: (() => Promise<boolean>) | undefined
onMount(async () => {
unsubscribe = await subscribeTyping(object._id, handleTypingInfo)
})
async function updateTypingSub (objectId: Ref<Doc>): Promise<void> {
await unsubscribe?.()
unsubscribe = await subscribeTyping(objectId, handleTypingInfo)
}
$: void updateTypingSub(object._id)
onDestroy(() => {
void unsubscribe?.()
@@ -11,7 +11,7 @@
<!-- See the License for the specific language governing permissions and -->
<!-- limitations under the License. -->
<script lang="ts">
import { onDestroy, onMount } from 'svelte'
import { onDestroy } from 'svelte'
import { getName, getCurrentEmployee, Person } from '@hcengineering/contact'
import { getPersonsByPersonRefs } from '@hcengineering/contact-resources'
import { Ref } from '@hcengineering/core'
@@ -62,9 +62,12 @@
let unsubscribe: (() => Promise<boolean>) | undefined
onMount(async () => {
async function updateTypingSub (cardId: CardID): Promise<void> {
await unsubscribe?.()
unsubscribe = await subscribeTyping(cardId, handleTypingInfo)
})
}
$: void updateTypingSub(cardId)
onDestroy(() => {
void unsubscribe?.()