Editing and error correction (in progress)
This commit is contained in:
@@ -170,13 +170,18 @@ const typingLabel = computed(() => {
|
||||
const roomId = activeRoom.value?.externalRoomId;
|
||||
if (!roomId) return '';
|
||||
const list = (typingMap.value?.[roomId] || []).filter(
|
||||
(t) => Date.now() - t.at < 3500,
|
||||
(t) => Date.now() - t.at < 4000,
|
||||
);
|
||||
if (!list.length) return '';
|
||||
const names = list
|
||||
.map((t) => {
|
||||
if (t.name) return t.name;
|
||||
if (t.userId === '__someone__') return '';
|
||||
return peers.value.find((p) => p.chatUserId === t.userId)?.fullName || '';
|
||||
return (
|
||||
peers.value.find((p) => p.chatUserId === t.userId)?.fullName ||
|
||||
peers.value.find((p) => p.id === t.userId)?.fullName ||
|
||||
''
|
||||
);
|
||||
})
|
||||
.filter(Boolean);
|
||||
if (!names.length) return 'در حال نوشتن…';
|
||||
|
||||
Reference in New Issue
Block a user