mirror of
https://github.com/abhinavxd/libredesk.git
synced 2026-09-22 10:33:24 +00:00
Fix widget greeting overflow with long names. Sync messages on every WS connect
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
class="max-h-8 max-w-full"
|
||||
/>
|
||||
<!-- Greeting and introduction -->
|
||||
<div class="mt-24 font-bold text-4xl">
|
||||
<div class="mt-24 font-bold text-4xl break-all">
|
||||
<h2>{{ parsedGreeting }}</h2>
|
||||
<p class="text-muted-foreground mt-2 font-semibold">
|
||||
{{ parsedIntroduction }}
|
||||
|
||||
@@ -58,7 +58,6 @@ export class WidgetWebSocketClient {
|
||||
|
||||
handleOpen () {
|
||||
this.reconnectInterval = 1000
|
||||
this.wasReconnecting = this.reconnectAttempts > 0
|
||||
this.reconnectAttempts = 0
|
||||
this.isReconnecting = false
|
||||
this.lastPong = Date.now()
|
||||
@@ -69,10 +68,8 @@ export class WidgetWebSocketClient {
|
||||
this.joinInbox()
|
||||
}
|
||||
|
||||
// If this was a reconnection, sync current conversation messages.
|
||||
if (this.wasReconnecting) {
|
||||
this.syncMissedMessages()
|
||||
}
|
||||
// Sync messages on every connect to pick up anything missed while disconnected.
|
||||
this.syncMissedMessages()
|
||||
}
|
||||
|
||||
handleMessage (event) {
|
||||
|
||||
Reference in New Issue
Block a user