mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-03-25 05:57:06 +00:00
[AB-xxx] fixing issues related to emote tracking
This commit is contained in:
@@ -28,9 +28,14 @@ public class UsedEmoteManagementServiceBean implements UsedEmoteManagementServic
|
||||
|
||||
@Override
|
||||
public UsedEmote createEmoteUsageForToday(TrackedEmote trackedEmote, Long count) {
|
||||
return createEmoteUsageFor(trackedEmote, count, Instant.now());
|
||||
}
|
||||
|
||||
@Override
|
||||
public UsedEmote createEmoteUsageFor(TrackedEmote trackedEmote, Long count, Instant instant) {
|
||||
UsedEmote usedEmote = UsedEmote
|
||||
.builder()
|
||||
.emoteId(new UsedEmoteDay(trackedEmote.getTrackedEmoteId().getId(), trackedEmote.getTrackedEmoteId().getServerId(), Instant.now()))
|
||||
.emoteId(new UsedEmoteDay(trackedEmote.getTrackedEmoteId().getId(), trackedEmote.getTrackedEmoteId().getServerId(), instant))
|
||||
.amount(count)
|
||||
.build();
|
||||
log.debug("Creating emote usage for emote {} in server {} with count {}.", trackedEmote.getTrackedEmoteId().getId(), trackedEmote.getTrackedEmoteId().getServerId(), count);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
abstracto.featureFlags.assignableRole.featureName=assignableRole
|
||||
abstracto.featureFlags.assignableRole.enabled=false
|
||||
abstracto.featureFlags.emoteTracking.featureName=emoteTracking
|
||||
abstracto.featureFlags.emoteTracking.enabled=false
|
||||
|
||||
|
||||
abstracto.featureModes.emoteAutoTrack.featureName=emoteTracking
|
||||
|
||||
@@ -29,6 +29,15 @@ public interface UsedEmoteManagementService {
|
||||
*/
|
||||
UsedEmote createEmoteUsageForToday(TrackedEmote trackedEmote, Long count);
|
||||
|
||||
/**
|
||||
* Creates and persists and instance of {@link UsedEmote} from the given {@link TrackedEmote}, with the defined count and the given date.
|
||||
* @param trackedEmote The {@link TrackedEmote} for which to create a {@link UsedEmote} for
|
||||
* @param count The amount of usages for the {@link UsedEmote}
|
||||
* @param instant The date to create the {@link UsedEmote emoteUsage} for
|
||||
* @return The created {@link UsedEmote} instance int he database
|
||||
*/
|
||||
UsedEmote createEmoteUsageFor(TrackedEmote trackedEmote, Long count, Instant instant);
|
||||
|
||||
/**
|
||||
* Loads {@link UsedEmote} for the {@link AServer} which are newer than the given {@link Instant}
|
||||
* @param server The {@link AServer} to retrieve the {@link UsedEmote} for
|
||||
|
||||
Reference in New Issue
Block a user