mirror of
https://github.com/paricafe/misskey.git
synced 2025-01-18 22:58:41 -06:00
feat: get note updatedAt from backend
This commit is contained in:
parent
b83f0c02bc
commit
0d942aacf8
4 changed files with 4 additions and 1 deletions
|
@ -120,6 +120,7 @@ export interface NoteEventTypes {
|
|||
updated: {
|
||||
cw: string | null;
|
||||
text: string;
|
||||
updatedAt: string;
|
||||
};
|
||||
reacted: {
|
||||
reaction: string;
|
||||
|
|
|
@ -86,6 +86,7 @@ export class NoteUpdateService {
|
|||
this.globalEventService.publishNoteStream(note.id, 'updated', {
|
||||
cw: ps.cw,
|
||||
text: ps.text ?? '', // prevent null
|
||||
updatedAt: ps.updatedAt.toISOString(),
|
||||
});
|
||||
|
||||
if (this.userEntityService.isLocalUser(user) && !note.localOnly) {
|
||||
|
|
|
@ -76,7 +76,7 @@ export function useNoteCapture(props: {
|
|||
}
|
||||
|
||||
case 'updated': {
|
||||
note.value.updatedAt = new Date().toISOString();
|
||||
note.value.updatedAt = body.updatedAt;
|
||||
note.value.cw = body.cw;
|
||||
note.value.text = body.text;
|
||||
break;
|
||||
|
|
|
@ -256,6 +256,7 @@ export type NoteUpdatedEvent = {
|
|||
body: {
|
||||
cw: string | null;
|
||||
text: string;
|
||||
updatedAt: string;
|
||||
};
|
||||
} | {
|
||||
type: 'pollVoted';
|
||||
|
|
Loading…
Reference in a new issue