Skip to content
Extraits de code Groupes Projets
Non vérifiée Valider 820899c2 rédigé par Sorunome's avatar Sorunome
Parcourir les fichiers

Merge remote-tracking branch 'origin/soru/fixroomcreation' into develop

parents 458c8331 1417fae9
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -15,6 +15,7 @@ limitations under the License. ...@@ -15,6 +15,7 @@ limitations under the License.
*/ */
import { Log } from "../log"; import { Log } from "../log";
import { IDatabaseConnector } from "./connector"; import { IDatabaseConnector } from "./connector";
import { Util } from "../util";
import * as uuid from "uuid/v4"; import * as uuid from "uuid/v4";
...@@ -271,11 +272,11 @@ export class DbRoomStore { ...@@ -271,11 +272,11 @@ export class DbRoomStore {
public async removeEntriesByMatrixRoomId(matrixId: string) { public async removeEntriesByMatrixRoomId(matrixId: string) {
const entries = (await this.db.All(`SELECT * FROM room_entries WHERE matrix_id = $matrixId`, {matrixId})) || []; const entries = (await this.db.All(`SELECT * FROM room_entries WHERE matrix_id = $matrixId`, {matrixId})) || [];
entries.map((entry) => { await Util.AsyncForEach(entries, async (entry) => {
if (entry.remote_id) { if (entry.remote_id) {
return this.removeEntriesByRemoteRoomId(entry.remote_id as string); await this.removeEntriesByRemoteRoomId(entry.remote_id as string);
} else if (entry.matrix_id) { } else if (entry.matrix_id) {
return this.db.Run(`DELETE FROM room_entries WHERE matrix_id = $matrixId`, {matrixId: entry.matrix_id}); await this.db.Run(`DELETE FROM room_entries WHERE matrix_id = $matrixId`, {matrixId: entry.matrix_id});
} }
}); });
} }
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter