From deec8829a53e5b75a837d31c5061d5ab4ecef420 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Thu, 4 Oct 2018 16:40:13 +0300 Subject: ActivityPub: handle user Delete event --- .../src/main/java/com/juick/server/ActivityPubManager.java | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'juick-server/src/main/java/com/juick/server/ActivityPubManager.java') diff --git a/juick-server/src/main/java/com/juick/server/ActivityPubManager.java b/juick-server/src/main/java/com/juick/server/ActivityPubManager.java index cbe7f623..c05deb15 100644 --- a/juick-server/src/main/java/com/juick/server/ActivityPubManager.java +++ b/juick-server/src/main/java/com/juick/server/ActivityPubManager.java @@ -9,6 +9,7 @@ import com.juick.server.api.activity.model.activities.Accept; import com.juick.server.api.activity.model.activities.Create; import com.juick.service.SocialService; import com.juick.service.activities.ActivityListener; +import com.juick.service.activities.DeleteUserEvent; import com.juick.service.activities.FollowEvent; import com.juick.service.activities.UndoFollowEvent; import com.juick.service.component.*; @@ -79,6 +80,13 @@ public class ActivityPubManager implements ActivityListener, NotificationListene } } + @Override + public void deleteUserEvent(DeleteUserEvent event) { + String acct = event.getUserUri(); + logger.info("Deleting {} from followers", acct); + socialService.removeAccount(acct); + } + @Override public void processMessageEvent(MessageEvent messageEvent) { Message msg = messageEvent.getMessage(); -- cgit v1.2.3