Handle typing events

This commit is contained in:
2025-12-01 17:23:15 +01:00
parent 32354f79ea
commit 30e63bfdb4
4 changed files with 46 additions and 3 deletions

View File

@@ -31,11 +31,13 @@ export class RoomEventsManager {
private events: MatrixEvent[];
messages: Message[];
endToken?: string;
typingUsers: string[];
constructor(room: Room, initialMessages: MatrixEventsList) {
this.room = room;
this.events = [];
this.messages = [];
this.typingUsers = [];
this.processNewEvents(initialMessages);
}
@@ -88,6 +90,9 @@ export class RoomEventsManager {
file: m.data.file,
},
};
} else if (m.type === "TypingEvent") {
this.typingUsers = m.user_ids;
return true;
} else {
// Ignore event
console.info("Event not supported => ignored");