Skip to content

Commit ef42403

Browse files
Fishbowlerguusdk
authored andcommitted
fixes 30: Update cache when creating or updating MUCs
When clustering, the MUC goes into the cache, but doesn't get an ID, and the savedToDB value is incorrect. No idea if this has any real world impact, but it's certainly wrong. This forces a sync the same way that Admin does when it creates a room.
1 parent c4390d1 commit ef42403

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

changelog.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ <h1>
4444
REST API Plugin Changelog
4545
</h1>
4646

47+
<p><b>1.8.2</b> ??? 2022</p>
48+
<ul>
49+
<li>[<a href='https://github.com/igniterealtime/openfire-restAPI-plugin/issues/30'>#30</a>] - Update cache when creating or updating MUCs</li>
50+
</ul>
51+
4752
<p><b>1.8.1</b> June 23, 2022</p>
4853
<ul>
4954
<li>[<a href='https://github.com/igniterealtime/openfire-restAPI-plugin/issues/108'>#108</a>] - On existence (HEAD) check, do not log absence of entity verbosely.</li>

src/java/org/jivesoftware/openfire/plugin/rest/controller/MUCRoomController.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,8 @@ private void createRoom(MUCRoomEntity mucRoomEntity, String serviceName) throws
375375
if (room.isPersistent()) {
376376
room.saveToDB();
377377
}
378+
379+
getService(serviceName).syncChatRoom(room);
378380
}
379381

380382
private boolean equalToAffiliations(MUCRoom room, MUCRoomEntity mucRoomEntity) {

0 commit comments

Comments
 (0)