uberf-9571: fix empty threads (#8153)

Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>
This commit is contained in:
Alexey Zinoviev 2025-03-06 16:50:46 +04:00 committed by GitHub
parent cc7178a1d4
commit e83d09a072
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -13,12 +13,10 @@
// limitations under the License.
-->
<script lang="ts">
import { SortingOrder } from '@hcengineering/core'
import { getCurrentAccount, SortingOrder } from '@hcengineering/core'
import { createQuery } from '@hcengineering/presentation'
import { Scroller, Loading, Lazy } from '@hcengineering/ui'
import activity, { ActivityMessage } from '@hcengineering/activity'
import { getCurrentEmployee } from '@hcengineering/contact'
import { socialIdsByPersonRefStore } from '@hcengineering/contact-resources'
import { ActivityMessagePresenter } from '@hcengineering/activity-resources'
import notification from '@hcengineering/notification'
import attachment from '@hcengineering/attachment'
@ -30,8 +28,6 @@
import LoadingHistory from '../LoadingHistory.svelte'
const threadsQuery = createQuery()
const me = getCurrentEmployee()
$: mySocialStrings = ($socialIdsByPersonRefStore.get(me) ?? []).map((si) => si.key)
let threads: ActivityMessage[] = []
let isLoading = true
@ -45,7 +41,7 @@
chunter.class.ChatMessage,
{
replies: { $gte: 1 },
[`${notification.mixin.Collaborators}.collaborators`]: { $in: mySocialStrings }
[`${notification.mixin.Collaborators}.collaborators`]: getCurrentAccount().uuid
},
(res) => {
if (res.length <= limit) {