Skip to content

Commit e38a2d1

Browse files
committed
remove extra bit of code
1 parent e7aa616 commit e38a2d1

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

src/models/room-sticky-events.ts

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -220,23 +220,6 @@ export class RoomStickyEventsStore extends TypedEventEmitter<RoomStickyEventsEve
220220
this.nextStickyEventExpiryTs = Math.min(this.nextStickyEventExpiryTs, event.unstableStickyExpiresAt);
221221
}
222222
}
223-
for (const event of this.unkeyedStickyEvents) {
224-
const expiresAtTs = event.unstableStickyExpiresAt;
225-
if (!expiresAtTs) {
226-
// We will have checked this already, but just for type safety skip this.
227-
logger.error("Should not have an event with a missing duration_ms!");
228-
removedEvents.push(event);
229-
break;
230-
}
231-
if (now >= expiresAtTs) {
232-
logger.debug("Expiring sticky event", event.getId());
233-
this.unkeyedStickyEvents.delete(event);
234-
removedEvents.push(event);
235-
} else {
236-
// If not removing the event, check to see if it's the next lowest expiry.
237-
this.nextStickyEventExpiryTs = Math.min(this.nextStickyEventExpiryTs, expiresAtTs);
238-
}
239-
}
240223
if (removedEvents.length) {
241224
this.emit(RoomStickyEventsEvent.Update, [], [], removedEvents);
242225
}

0 commit comments

Comments
 (0)