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

small fixes

parent f50355b5
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -205,7 +205,7 @@
},
"async": {
"version": "0.2.10",
"resolved": "https://registry.npmjs.org/async/-/async-0.2.10.tgz",
"resolved": "http://registry.npmjs.org/async/-/async-0.2.10.tgz",
"integrity": "sha1-trvgsGdLnXGXCMo43owjfLUmw9E="
},
"async-limiter": {
......@@ -1150,7 +1150,7 @@
},
"finalhandler": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.1.tgz",
"resolved": "http://registry.npmjs.org/finalhandler/-/finalhandler-1.1.1.tgz",
"integrity": "sha512-Y1GUDo39ez4aHAw7MysnUD5JzYX+WaIj8I57kO3aEPT1fFRL4sr7mjei97FgnwhAyyzRYmQZaTHb2+9uZ1dPtg==",
"requires": {
"debug": "2.6.9",
......@@ -1366,7 +1366,7 @@
},
"http-errors": {
"version": "1.6.3",
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz",
"resolved": "http://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz",
"integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=",
"requires": {
"depd": "~1.1.2",
......@@ -1839,7 +1839,7 @@
"dependencies": {
"bluebird": {
"version": "2.11.0",
"resolved": "https://registry.npmjs.org/bluebird/-/bluebird-2.11.0.tgz",
"resolved": "http://registry.npmjs.org/bluebird/-/bluebird-2.11.0.tgz",
"integrity": "sha1-U0uQM8AiyVecVro7Plpcqvu2UOE="
}
}
......@@ -1864,7 +1864,7 @@
},
"media-typer": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
"resolved": "http://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
"integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g="
},
"merge-descriptors": {
......
......@@ -105,7 +105,7 @@ avatarurl_mxc = $avatarurl_mxc WHERE remote_id = $remote_id`,
(await this.db.All(
"SELECT guild_id, nick FROM remote_user_guild_nicks WHERE remote_id = $remoteId",
{remoteId: user.id},
)).forEach(({g, n}) => existingNicks[g as string] = n);
)).forEach(({guild_id, nick}) => existingNicks[guild_id as string] = nick);
for (const guildId of user.guildNicks.keys()) {
const nick = user.guildNicks.get(guildId) || null;
if (existingData) {
......
......@@ -379,6 +379,7 @@ export class UserSyncroniser {
if (guild.members.has(id)) {
log.info(`Updating user ${id} in guild ${guild.id}.`);
const member = guild.members.get(id);
try {
const state = await this.GetUserStateForGuildMember(member!);
const rooms = await this.discord.GetRoomIdsFromGuild(guild, member!);
await Promise.all(
......@@ -386,6 +387,9 @@ export class UserSyncroniser {
async (roomId) => this.ApplyStateToRoom(state, roomId, guild.id),
),
);
} catch (err) {
log.warn(`Failed to update user ${id} in guild ${guild.id}`, err);
}
}
});
}
......
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