aboutsummaryrefslogtreecommitdiff
path: root/juick-www/src/main/java/com/juick/www/Main.java
diff options
context:
space:
mode:
Diffstat (limited to 'juick-www/src/main/java/com/juick/www/Main.java')
-rw-r--r--juick-www/src/main/java/com/juick/www/Main.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/juick-www/src/main/java/com/juick/www/Main.java b/juick-www/src/main/java/com/juick/www/Main.java
index 99d06fe6..27ecf3ec 100644
--- a/juick-www/src/main/java/com/juick/www/Main.java
+++ b/juick-www/src/main/java/com/juick/www/Main.java
@@ -64,6 +64,7 @@ public class Main extends HttpServlet {
User pagesUser = new User();
UserThread pagesUserThread = new UserThread();
NewMessage pagesNewMessage;
+ XMPPPost xmppPost = new XMPPPost();
FacebookLogin loginFacebook;
VKontakteLogin loginVK = new VKontakteLogin();
TwitterAuth twitterAuth;
@@ -377,6 +378,14 @@ public class Main extends HttpServlet {
response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
}
break;
+ case "/post2":
+ com.juick.User visitor = Utils.getVisitorUser(sql, request, response);
+ if (visitor.getUid() > 0 && !visitor.isBanned()) {
+ xmppPost.doPostMessage(sql, request, response, xmpp, visitor);
+ } else {
+ response.sendError(HttpServletResponse.SC_FORBIDDEN);
+ }
+ break;
default:
response.sendError(HttpServletResponse.SC_METHOD_NOT_ALLOWED);
break;