package net.pterodactylus.sone.web;
import net.pterodactylus.sone.data.Sone;
-import net.pterodactylus.sone.data.SoneShell;
import net.pterodactylus.util.template.Template;
/**
String soneId = request.getHttpRequest().getParam("sone");
Sone currentSone = getCurrentSone(request.getToadletContext());
Sone sone = webInterface.core().getSone(soneId);
- if (!(sone instanceof SoneShell) && !sone.equals(currentSone)) {
- currentSone.addFriendSone(sone);
+ if (!sone.equals(currentSone)) {
+ currentSone.addFriend(sone);
}
throw new RedirectException("viewSone.html?sone=" + soneId);
}