merge: real-time updates on note detail view (#246)
Closes #223 Reviewed-on: https://git.joinsharkey.org/Sharkey/Sharkey/pulls/246 Reviewed-by: Marie <marie@kaifa.ch>
This commit is contained in:
@@ -130,6 +130,9 @@ export interface NoteEventTypes {
|
||||
reaction: string;
|
||||
userId: MiUser['id'];
|
||||
};
|
||||
replied: {
|
||||
id: MiNote['id'];
|
||||
};
|
||||
}
|
||||
type NoteStreamEventTypes = {
|
||||
[key in keyof NoteEventTypes]: {
|
||||
|
||||
@@ -780,6 +780,9 @@ export class NoteCreateService implements OnApplicationShutdown {
|
||||
|
||||
// If has in reply to note
|
||||
if (data.reply) {
|
||||
this.globalEventService.publishNoteStream(data.reply.id, 'replied', {
|
||||
id: note.id,
|
||||
});
|
||||
// 通知
|
||||
if (data.reply.userHost === null) {
|
||||
const isThreadMuted = await this.noteThreadMutingsRepository.exist({
|
||||
|
||||
Reference in New Issue
Block a user