public HttpAction getNextMessage() {
if (first) {
try {
if (!bot.isEditApi())
throw new VersionException("write api off - user triggerd");
switch (bot.getVersion()) {
case MW1_09:
case MW1_10:
case MW1_11:
case MW1_12:
throw new VersionException("write api not available");
default:
break;
}
first = false;
if (!(bot.getUserinfo().getRights().contains("edit")
&& bot.getUserinfo().getRights().contains("writeapi"))) {
throw new VersionException("write api not avalibal");
}
apiReq = new GetApiToken(GetApiToken.Intoken.EDIT,
a.getTitle(), bot.getVersion(), bot.getUserinfo());
apiGet = apiReq.getNextMessage();
apiEdit = true;