fix: work through LOTUS_BUGS.md audit items
- ExportRoomHistory: make addEvents() async, call decryptEventIfNeeded() before inspecting type/content so E2EE rooms export decrypted text - UrlPreviewCard: remove Google S2 favicon (privacy leak); show generic Icons.Link instead — no third-party external calls - Profile: add statusDirtyRef so server presence sync cannot clobber in-flight emoji insertions or keystrokes; cleared on save/clear - useLocalMessageSearch: include m.sticker, m.poll.start, and org.matrix.msc3381.poll.start in encrypted room search; index poll question and answer bodies - SeasonalEffect: z-index 9997 → 9999 so overlays render above animated chat backgrounds - LOTUS_BUGS.md: mark all resolved, document remaining blocked items Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -56,11 +56,17 @@ export function ExportRoomHistory({ requestClose }: ExportRoomHistoryProps) {
|
||||
const timeline = room.getLiveTimeline();
|
||||
let canLoadMore = true;
|
||||
|
||||
const addEvents = (events: ReturnType<typeof timeline.getEvents>) => {
|
||||
const addEvents = async (events: ReturnType<typeof timeline.getEvents>) => {
|
||||
for (const ev of events) {
|
||||
const evId = ev.getId();
|
||||
if (!evId || seen.has(evId)) continue;
|
||||
seen.add(evId);
|
||||
// Attempt decryption for events that haven't been decrypted yet
|
||||
// (paginateEventTimeline may fetch events before the SDK decrypts them)
|
||||
if (ev.isEncrypted() && !ev.getClearContent()) {
|
||||
// eslint-disable-next-line no-await-in-loop
|
||||
await mx.decryptEventIfNeeded(ev).catch(() => undefined);
|
||||
}
|
||||
if (ev.getType() !== EventType.RoomMessage) continue;
|
||||
if (ev.isDecryptionFailure()) continue;
|
||||
const ts = ev.getTs();
|
||||
@@ -81,7 +87,7 @@ export function ExportRoomHistory({ requestClose }: ExportRoomHistoryProps) {
|
||||
setExportCount(collected.length);
|
||||
};
|
||||
|
||||
addEvents(timeline.getEvents());
|
||||
await addEvents(timeline.getEvents());
|
||||
|
||||
// Paginate backwards until start or date range exceeded
|
||||
while (canLoadMore) {
|
||||
@@ -98,7 +104,8 @@ export function ExportRoomHistory({ requestClose }: ExportRoomHistoryProps) {
|
||||
limit: 100,
|
||||
});
|
||||
|
||||
addEvents(timeline.getEvents());
|
||||
// eslint-disable-next-line no-await-in-loop
|
||||
await addEvents(timeline.getEvents());
|
||||
}
|
||||
|
||||
// Sort chronologically (oldest first)
|
||||
|
||||
Reference in New Issue
Block a user