You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-07 10:46:24 +03:00
Update CIDER local and session storage keys to unbrick downgrade compat
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
@@ -41,7 +41,7 @@ export default class SendHistoryManager {
|
||||
|
||||
while (itemJSON = sessionStorage.getItem(`${this.prefix}[${index}]`)) {
|
||||
try {
|
||||
this.history.push(SendHistoryManager.parseItem(JSON.parse(itemJSON)));
|
||||
this.history.push(JSON.parse(itemJSON));
|
||||
} catch (e) {
|
||||
console.warn("Throwing away unserialisable history", e);
|
||||
break;
|
||||
@@ -60,16 +60,6 @@ export default class SendHistoryManager {
|
||||
};
|
||||
}
|
||||
|
||||
static parseItem(item: IHistoryItem | SerializedPart[]): IHistoryItem {
|
||||
if (Array.isArray(item)) {
|
||||
// XXX: migrate from old format already in Storage
|
||||
return {
|
||||
parts: item,
|
||||
};
|
||||
}
|
||||
return item;
|
||||
}
|
||||
|
||||
save(editorModel: EditorModel, replyEvent?: MatrixEvent) {
|
||||
const item = SendHistoryManager.createItem(editorModel, replyEvent);
|
||||
this.history.push(item);
|
||||
|
||||
Reference in New Issue
Block a user