Merge pull request #53 from cheeaun/main

Update from main
This commit is contained in:
Chee Aun 2023-02-01 02:10:43 +08:00 committed by GitHub
commit 69c3f1a082
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -445,9 +445,9 @@ function groupNotifications(notifications) {
const cleanNotifications = [];
for (let i = 0, j = 0; i < notifications.length; i++) {
const notification = notifications[i];
const { status, account, type, created_at } = notification;
const createdAt = new Date(created_at).toLocaleDateString();
const key = `${status?.id}-${type}-${createdAt}`;
const { status, account, type, createdAt } = notification;
const date = new Date(createdAt).toLocaleDateString();
const key = `${status?.id}-${type}-${date}`;
const mappedNotification = notificationsMap[key];
if (mappedNotification?.account) {
mappedNotification._accounts.push(account);