");
if (!message.isRoomEvent()) {
builder.append("").append("[").append(time).append("]").append(" | ");
diff --git a/src/java/org/jivesoftware/openfire/archive/GroupConversationInterceptor.java b/src/java/org/jivesoftware/openfire/archive/GroupConversationInterceptor.java
index 6d4e5e16d..459b10f18 100644
--- a/src/java/org/jivesoftware/openfire/archive/GroupConversationInterceptor.java
+++ b/src/java/org/jivesoftware/openfire/archive/GroupConversationInterceptor.java
@@ -148,9 +148,25 @@ public void messageReceived(JID roomJID, JID user, String nickname, Message mess
conversationManager.getRoomsArchived().isEmpty() ||
conversationManager.getRoomsArchived().contains(roomJID.getNode()));
- ConversationEventsQueue eventsQueue = conversationManager.getConversationEventsQueue();
- eventsQueue.addGroupChatEvent(conversationManager.getRoomConversationKey(roomJID),
+ if (withBody)
+ {
+ ConversationEventsQueue eventsQueue = conversationManager.getConversationEventsQueue();
+ eventsQueue.addGroupChatEvent(conversationManager.getRoomConversationKey(roomJID),
ConversationEvent.roomMessageReceived(roomJID, user, null, nickname, withBody ? message.getBody() : null, message.toXML(), now));
+ }
+ else
+ {
+ String stanza = message.toXML();
+ ChatMarker.MARKERTYPE markertype = ChatMarker.searchForXep0333(stanza);
+
+ if (markertype!=ChatMarker.MARKERTYPE.NONE)
+ {
+ ConversationEventsQueue eventsQueue = conversationManager.getConversationEventsQueue();
+ eventsQueue.addGroupChatEvent(conversationManager.getRoomConversationKey(roomJID),
+ ConversationEvent.chatmarkerMessageReceived(roomJID, user, markertype,stanza,
+ new Date()));
+ }
+ }
}
}
diff --git a/src/web/archiving-settings.jsp b/src/web/archiving-settings.jsp
index f062d57e8..6878b0d3a 100644
--- a/src/web/archiving-settings.jsp
+++ b/src/web/archiving-settings.jsp
@@ -184,6 +184,7 @@
boolean messageArchiving = conversationManager.isMessageArchivingEnabled();
boolean roomArchiving = conversationManager.isRoomArchivingEnabled();
boolean roomArchivingStanzas = conversationManager.isRoomArchivingStanzasEnabled();
+ boolean chatmarkerArchiving = conversationManager.isChatmarkerArchivingEnabled();
Duration idleTime = Duration.ofMinutes(ParamUtils.getLongParameter(request, "idleTime", conversationManager.getIdleTime().toMinutes()));
Duration maxTime = Duration.ofMinutes(ParamUtils.getLongParameter(request, "maxTime", conversationManager.getMaxTime().toMinutes()));
@@ -238,6 +239,7 @@
roomArchiving = request.getParameter("roomArchiving") != null;
roomArchivingStanzas = request.getParameter("roomArchivingStanzas") != null;
String roomsArchived = request.getParameter("roomsArchived");
+ chatmarkerArchiving = request.getParameter("chatmarkerArchiving") != null;
// Validate params
if (idleTime.toMinutes() < 1) {
@@ -269,13 +271,14 @@
conversationManager.setRoomsArchived(StringUtils.stringToCollection(roomsArchived));
conversationManager.setIdleTime(idleTime);
conversationManager.setMaxTime(maxTime);
-
+ conversationManager.setChatmarkerArchivingEnabled(chatmarkerArchiving);
conversationManager.setMaxAge(maxAge);
conversationManager.setMaxRetrievable(maxRetrievable);
webManager.logEvent("Changed archive settings (monitoring plugin)",
"Metadata Archiving Enabled: " + metadataArchiving
+ ", Message Archiving Enabled: " + messageArchiving
+ + ", Chatmarker Archiving Enabled: " + chatmarkerArchiving
+ ", Room Archiving Enabled: " + roomArchiving
+ ", Room Archiving Stanzas Enabled: " + roomArchivingStanzas
+ ", RoomsArchived: " + StringUtils.stringToCollection(roomsArchived)
@@ -360,6 +363,10 @@
|
/> |
+