From 230e5e80d9b1e3ca4535fb0dbba19246d799a737 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Thu, 18 Jan 2018 15:16:14 +0300 Subject: tg: delete also from chat --- juick-www/src/main/java/com/juick/www/controllers/Settings.java | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'juick-www/src/main/java/com/juick/www') diff --git a/juick-www/src/main/java/com/juick/www/controllers/Settings.java b/juick-www/src/main/java/com/juick/www/controllers/Settings.java index a2459654..5eb36b36 100644 --- a/juick-www/src/main/java/com/juick/www/controllers/Settings.java +++ b/juick-www/src/main/java/com/juick/www/controllers/Settings.java @@ -46,6 +46,7 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.util.Arrays; +import java.util.Collections; import java.util.List; import java.util.stream.Collectors; import java.util.stream.IntStream; @@ -237,6 +238,9 @@ public class Settings { break; case "telegram-del": telegramService.deleteTelegramUser(visitor.getUid()); + telegramService.getTelegramIdentifiers(Collections.singletonList(visitor)).forEach(t -> { + telegramService.deleteChat(t); + }); result = "
"; break; case "facebook-disable": -- cgit v1.2.3