From 21822f7803506edcc8ca182b9b673bbe1a055f6b Mon Sep 17 00:00:00 2001 From: Abbas Abou Daya Date: Sat, 29 Feb 2020 16:27:05 -0800 Subject: [PATCH] Remove redundant commits to DB --- .../org/telegram/abilitybots/api/bot/DefaultAbilities.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/telegrambots-abilities/src/main/java/org/telegram/abilitybots/api/bot/DefaultAbilities.java b/telegrambots-abilities/src/main/java/org/telegram/abilitybots/api/bot/DefaultAbilities.java index 3405cfb8..bdcf9456 100644 --- a/telegrambots-abilities/src/main/java/org/telegram/abilitybots/api/bot/DefaultAbilities.java +++ b/telegrambots-abilities/src/main/java/org/telegram/abilitybots/api/bot/DefaultAbilities.java @@ -60,7 +60,6 @@ import static org.telegram.abilitybots.api.util.AbilityMessageCodes.ABILITY_UNBA import static org.telegram.abilitybots.api.util.AbilityMessageCodes.ABILITY_UNBAN_SUCCESS; import static org.telegram.abilitybots.api.util.AbilityMessageCodes.USER_NOT_FOUND; import static org.telegram.abilitybots.api.util.AbilityUtils.addTag; -import static org.telegram.abilitybots.api.util.AbilityUtils.commitTo; import static org.telegram.abilitybots.api.util.AbilityUtils.escape; import static org.telegram.abilitybots.api.util.AbilityUtils.getLocalizedMessage; import static org.telegram.abilitybots.api.util.AbilityUtils.shortName; @@ -288,7 +287,6 @@ public final class DefaultAbilities implements AbilityExtension { sendMd(ABILITY_BAN_SUCCESS, ctx, escape(bannedUser)); } }) - .post(commitTo(bot.db)) .build(); } @@ -315,7 +313,6 @@ public final class DefaultAbilities implements AbilityExtension { bot.silent.sendMd(getLocalizedMessage(ABILITY_UNBAN_SUCCESS, ctx.user().getLanguageCode(), escape(username)), ctx.chatId()); } }) - .post(commitTo(bot.db)) .build(); } @@ -339,7 +336,7 @@ public final class DefaultAbilities implements AbilityExtension { admins.add(userId); sendMd(ABILITY_PROMOTE_SUCCESS, ctx, escape(username)); } - }).post(commitTo(bot.db)) + }) .build(); } @@ -363,7 +360,6 @@ public final class DefaultAbilities implements AbilityExtension { sendMd(ABILITY_DEMOTE_FAIL, ctx, escape(username)); } }) - .post(commitTo(bot.db)) .build(); } @@ -389,7 +385,6 @@ public final class DefaultAbilities implements AbilityExtension { send(ABILITY_CLAIM_SUCCESS, ctx); } }) - .post(commitTo(bot.db)) .build(); }