Fix group forums

This commit is contained in:
Alejandro 2020-01-27 21:02:22 +02:00
parent 97f4dd17e1
commit 22926bf0b4
3 changed files with 5 additions and 1 deletions

View File

@ -192,7 +192,7 @@ public class ForumThreadComment implements Runnable, ISerialize {
if (!this.needsUpdate)
return;
try (Connection connection = Emulator.getDatabase().getDataSource().getConnection(); PreparedStatement statement = connection.prepareStatement("UPDATE guilds_forums_comments` SET `state` = ?, `admin_id` = ? WHERE `id` = ?;")) {
try (Connection connection = Emulator.getDatabase().getDataSource().getConnection(); PreparedStatement statement = connection.prepareStatement("UPDATE guilds_forums_comments SET `state` = ?, `admin_id` = ? WHERE `id` = ?")) {
statement.setInt(1, this.state.getStateId());
statement.setInt(2, this.adminId);
statement.setInt(3, this.commentId);

View File

@ -60,6 +60,8 @@ public class GuildForumModerateMessageEvent extends MessageHandler {
comment.setAdminId(this.client.getHabbo().getHabboInfo().getId());
this.client.sendResponse(new PostUpdateMessageComposer(guild.getId(), thread.getThreadId(), comment));
Emulator.getThreading().run(comment);
switch (state) {
case 10:
case 20:

View File

@ -51,6 +51,8 @@ public class GuildForumModerateThreadEvent extends MessageHandler {
thread.setState(ForumThreadState.fromValue(state));
thread.setAdminId(this.client.getHabbo().getHabboInfo().getId());
Emulator.getThreading().run(thread);
switch (state) {
case 10:
case 20: