Skip to content
Extraits de code Groupes Projets
Non vérifiée Valider 21fcad62 rédigé par Will Hunt's avatar Will Hunt Validation de GitHub
Parcourir les fichiers

Merge pull request #147 from eeeeeta/fix-media-redactions

insert attachment messages into the store as well
parents 002418d2 054219c3
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -231,7 +231,7 @@ export class DiscordBot {
// Webhooks don't send guild info.
evt.GuildId = guildId;
evt.ChannelId = channelId;
this.store.Insert(evt);
return this.store.Insert(evt);
});
return;
}
......@@ -453,7 +453,7 @@ export class DiscordBot {
evt.DiscordId = msgID;
evt.ChannelId = chan.id;
evt.GuildId = guild.id;
this.store.Insert(evt);
return this.store.Insert(evt);
});
});
......@@ -585,6 +585,13 @@ export class DiscordBot {
msgtype,
url: content.mxcUrl,
external_url: attachment.url,
}).then((res) => {
const evt = new DbEvent();
evt.MatrixId = res.event_id + ";" + room;
evt.DiscordId = msg.id;
evt.ChannelId = msg.channel.id;
evt.GuildId = msg.guild.id;
return this.store.Insert(evt);
});
});
});
......@@ -603,7 +610,7 @@ export class DiscordBot {
evt.DiscordId = msg.id;
evt.ChannelId = msg.channel.id;
evt.GuildId = msg.guild.id;
this.store.Insert(evt);
return this.store.Insert(evt);
});
});
});
......
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