feat: sync notifications read time
This commit is contained in:
parent
776f290ef9
commit
30da0319ce
7 changed files with 96 additions and 46 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import { ExtendedKind } from '@/constants'
|
||||
import { ApplicationDataKey, ExtendedKind } from '@/constants'
|
||||
import client from '@/services/client.service'
|
||||
import { TDraftEvent, TMailboxRelay, TRelaySet } from '@/types'
|
||||
import dayjs from 'dayjs'
|
||||
|
|
@ -274,6 +274,15 @@ export function createFavoriteRelaysDraftEvent(
|
|||
}
|
||||
}
|
||||
|
||||
export function createSeenNotificationsAtDraftEvent(): TDraftEvent {
|
||||
return {
|
||||
kind: kinds.Application,
|
||||
content: 'Records read time to sync notification status across devices.',
|
||||
tags: [['d', ApplicationDataKey.NOTIFICATIONS_SEEN_AT]],
|
||||
created_at: dayjs().unix()
|
||||
}
|
||||
}
|
||||
|
||||
function generateImetaTags(imageUrls: string[], pictureInfos: { url: string; tags: string[][] }[]) {
|
||||
return imageUrls.map((imageUrl) => {
|
||||
const pictureInfo = pictureInfos.find((info) => info.url === imageUrl)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue