Commit 22933d99 authored by Lars Holter's avatar Lars Holter
Browse files

Removed redundant else if statement in Handler

parent 3b086f31
......@@ -227,10 +227,7 @@ public class Handler extends AbstractHandler
UUID messageId =
UUID.fromString(Maybe.just(request.getParameter("message")).get());
Stored<Channel.Event> message = inchat.getEvent(messageId).get();
if (message.value.sender.equals(account.value.user.value.name.get())) {
channel = inchat.deleteEvent(channel, message);
}
else if (isAdminOrMod) {
if (message.value.sender.equals(account.value.user.value.name.get()) || isAdminOrMod) {
channel = inchat.deleteEvent(channel, message);
}
}
......@@ -241,10 +238,7 @@ public class Handler extends AbstractHandler
UUID.fromString(Maybe.just(request.getParameter("message")).get());
Stored<Channel.Event> event = inchat.getEvent(messageId).get();
if (event.value.sender.equals(account.value.user.value.name.get())) {
channel = inchat.editMessage(channel, event, message);
}
else if (isAdminOrMod) {
if (event.value.sender.equals(account.value.user.value.name.get()) || isAdminOrMod) {
channel = inchat.editMessage(channel, event, message);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment