mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-03-27 14:23:56 +00:00
[AB-80] fixing not cleaning up emote record when changing emote
This commit is contained in:
@@ -166,6 +166,7 @@ public class EmoteServiceBean implements EmoteService {
|
||||
.builder()
|
||||
.fake(true)
|
||||
.custom(false)
|
||||
.animated(false)
|
||||
.emoteKey(emoteText)
|
||||
.build();
|
||||
}
|
||||
|
||||
@@ -160,15 +160,16 @@ public class EmoteManagementServiceBean implements EmoteManagementService {
|
||||
if(fakeEmote.getCustom()) {
|
||||
log.debug("Setting existing emote (a: {}, c: {}, id: {}, discord id: {}) to new custom emote configuration: new id {}, animated {}.",
|
||||
emoteBeingSet.getAnimated(), emoteBeingSet.getCustom(), emoteBeingSet.getId(), emoteBeingSet.getEmoteId(), fakeEmote.getEmoteId(), fakeEmote.getAnimated());
|
||||
emoteBeingSet.setCustom(fakeEmote.getCustom());
|
||||
emoteBeingSet.setEmoteId(fakeEmote.getEmoteId());
|
||||
emoteBeingSet.setEmoteKey(fakeEmote.getEmoteKey());
|
||||
emoteBeingSet.setAnimated(fakeEmote.getAnimated());
|
||||
} else {
|
||||
log.debug("Setting existing emote (a: {}, c: {}, id: {}, discord id: {}) to new default emote {}.",
|
||||
emoteBeingSet.getAnimated(), emoteBeingSet.getCustom(), emoteBeingSet.getId(), emoteBeingSet.getEmoteId(), fakeEmote.getEmoteKey());
|
||||
emoteBeingSet.setCustom(false);
|
||||
emoteBeingSet.setEmoteKey(fakeEmote.getEmoteKey());
|
||||
emoteBeingSet.setEmoteId(null);
|
||||
emoteBeingSet.setAnimated(false);
|
||||
}
|
||||
emoteBeingSet.setCustom(fakeEmote.getCustom());
|
||||
emoteBeingSet.setEmoteKey(fakeEmote.getEmoteKey());
|
||||
return emoteBeingSet;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user