Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
Openfire
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Openfire
Commits
967d632e
Commit
967d632e
authored
Jul 04, 2016
by
Roman Soldatow
Committed by
daryl herzmann
Jul 04, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
REST API Plugin update to version 1.2.4 (#611)
- Fixed: Send a presence by affiliation change
parent
27c5cc74
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
12 deletions
+24
-12
changelog.html
src/plugins/restAPI/changelog.html
+5
-0
plugin.xml
src/plugins/restAPI/plugin.xml
+2
-2
MUCRoomController.java
...re/openfire/plugin/rest/controller/MUCRoomController.java
+17
-10
No files found.
src/plugins/restAPI/changelog.html
View file @
967d632e
...
...
@@ -44,6 +44,11 @@
REST API Plugin Changelog
</h1>
<p><b>
1.2.4
</b>
-- July 4th, 2016
</p>
<ul>
<li>
Fixed: Send a presence by affiliation change
</li>
</ul>
<p><b>
1.2.3
</b>
-- May 3rd, 2016
</p>
<ul>
<li>
Added: Add a group with role to a chat room
</li>
...
...
src/plugins/restAPI/plugin.xml
View file @
967d632e
...
...
@@ -5,8 +5,8 @@
<name>
REST API
</name>
<description>
Allows administration over a RESTful API.
</description>
<author>
Roman Soldatow
</author>
<version>
1.2.3
</version>
<date>
05/03
/2016
</date>
<version>
1.2.4
</version>
<date>
07/04
/2016
</date>
<minServerVersion>
4.0.0
</minServerVersion>
<adminconsole>
<tab
id=
"tab-server"
>
...
...
src/plugins/restAPI/src/java/org/jivesoftware/openfire/plugin/rest/controller/MUCRoomController.java
View file @
967d632e
...
...
@@ -9,6 +9,15 @@ import javax.ws.rs.core.Response;
import
org.jivesoftware.openfire.XMPPServer
;
import
org.jivesoftware.openfire.cluster.ClusterManager
;
import
org.jivesoftware.openfire.group.ConcurrentGroupList
;
import
org.jivesoftware.openfire.group.Group
;
import
org.jivesoftware.openfire.muc.ConflictException
;
import
org.jivesoftware.openfire.muc.ForbiddenException
;
import
org.jivesoftware.openfire.muc.MUCRole
;
import
org.jivesoftware.openfire.muc.MUCRoom
;
import
org.jivesoftware.openfire.muc.NotAllowedException
;
import
org.jivesoftware.openfire.muc.cluster.RoomUpdatedEvent
;
import
org.jivesoftware.openfire.muc.spi.LocalMUCRoom
;
import
org.jivesoftware.openfire.plugin.rest.entity.MUCChannelType
;
import
org.jivesoftware.openfire.plugin.rest.entity.MUCRoomEntities
;
import
org.jivesoftware.openfire.plugin.rest.entity.MUCRoomEntity
;
...
...
@@ -18,20 +27,12 @@ import org.jivesoftware.openfire.plugin.rest.entity.ParticipantEntities;
import
org.jivesoftware.openfire.plugin.rest.entity.ParticipantEntity
;
import
org.jivesoftware.openfire.plugin.rest.exceptions.ExceptionType
;
import
org.jivesoftware.openfire.plugin.rest.exceptions.ServiceException
;
import
org.jivesoftware.openfire.muc.ConflictException
;
import
org.jivesoftware.openfire.muc.ForbiddenException
;
import
org.jivesoftware.openfire.muc.MUCRole
;
import
org.jivesoftware.openfire.muc.MUCRoom
;
import
org.jivesoftware.openfire.muc.NotAllowedException
;
import
org.jivesoftware.openfire.muc.cluster.RoomUpdatedEvent
;
import
org.jivesoftware.openfire.muc.spi.LocalMUCRoom
;
import
org.jivesoftware.openfire.group.ConcurrentGroupList
;
import
org.jivesoftware.openfire.group.Group
;
import
org.jivesoftware.openfire.plugin.rest.utils.MUCRoomUtils
;
import
org.jivesoftware.openfire.plugin.rest.utils.UserUtils
;
import
org.jivesoftware.util.AlreadyExistsException
;
import
org.jivesoftware.util.cache.CacheFactory
;
import
org.xmpp.packet.JID
;
import
org.xmpp.packet.Presence
;
/**
* The Class MUCRoomController.
...
...
@@ -578,7 +579,13 @@ public class MUCRoomController {
MUCRoom
room
=
XMPPServer
.
getInstance
().
getMultiUserChatManager
().
getMultiUserChatService
(
serviceName
)
.
getChatRoom
(
roomName
.
toLowerCase
());
try
{
room
.
addNone
(
UserUtils
.
checkAndGetJID
(
jid
),
room
.
getRole
());
JID
userJid
=
UserUtils
.
checkAndGetJID
(
jid
);
// Send a presence to other room members
List
<
Presence
>
addNonePresence
=
room
.
addNone
(
userJid
,
room
.
getRole
());
for
(
Presence
presence
:
addNonePresence
)
{
room
.
send
(
presence
);
}
}
catch
(
ForbiddenException
e
)
{
throw
new
ServiceException
(
"Could not delete affiliation"
,
jid
,
ExceptionType
.
NOT_ALLOWED
,
Response
.
Status
.
FORBIDDEN
,
e
);
}
catch
(
ConflictException
e
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment