Delete reactions when their parent message is deleted

This commit is contained in:
Scott Nonnenberg 2021-10-15 15:54:31 -07:00 committed by GitHub
parent e6ca3872d1
commit efde909484
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 185 additions and 8 deletions

View file

@ -221,6 +221,7 @@ const dataInterface: ClientInterface = {
markReactionAsRead,
removeReactionFromConversation,
addReaction,
_getAllReactions,
getMessageBySender,
getMessageById,
@ -1258,6 +1259,10 @@ async function addReaction(reactionObj: ReactionType) {
return channels.addReaction(reactionObj);
}
async function _getAllReactions() {
return channels._getAllReactions();
}
function handleMessageJSON(messages: Array<MessageTypeUnhydrated>) {
return messages.map(message => JSON.parse(message.json));
}