mirror of
https://github.com/igniterealtime/Spark.git
synced 2025-12-01 12:27:58 +00:00
Updating offline notifications.
git-svn-id: http://svn.igniterealtime.org/svn/repos/spark/trunk@9233 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
@ -44,13 +44,6 @@ import org.jivesoftware.sparkimpl.plugin.gateways.GatewayPlugin;
|
||||
import org.jivesoftware.sparkimpl.plugin.manager.Enterprise;
|
||||
import org.jivesoftware.sparkimpl.plugin.transcripts.ChatTranscriptPlugin;
|
||||
|
||||
import javax.swing.AbstractAction;
|
||||
import javax.swing.JComponent;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.JTabbedPane;
|
||||
import javax.swing.KeyStroke;
|
||||
import javax.swing.SwingUtilities;
|
||||
|
||||
import java.awt.CardLayout;
|
||||
import java.awt.Color;
|
||||
import java.awt.GridBagConstraints;
|
||||
@ -59,6 +52,13 @@ import java.awt.Insets;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.util.TimerTask;
|
||||
|
||||
import javax.swing.AbstractAction;
|
||||
import javax.swing.JComponent;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.JTabbedPane;
|
||||
import javax.swing.KeyStroke;
|
||||
import javax.swing.SwingUtilities;
|
||||
|
||||
|
||||
/**
|
||||
* The inner Container for Spark. The Workspace is the container for all plugins into the Spark
|
||||
@ -305,12 +305,19 @@ public class Workspace extends JPanel implements PacketListener {
|
||||
final String body = message.getBody();
|
||||
boolean broadcast = message.getProperty("broadcast") != null;
|
||||
|
||||
// Handle offline message.
|
||||
DelayInformation offlineInformation = (DelayInformation)message.getExtension("x", "jabber:x:delay");
|
||||
if (offlineInformation != null && (Message.Type.chat == message.getType() ||
|
||||
Message.Type.normal == message.getType())) {
|
||||
handleOfflineMessage(message);
|
||||
}
|
||||
|
||||
if (body == null ||
|
||||
isGroupChat ||
|
||||
broadcast ||
|
||||
message.getType() == Message.Type.normal ||
|
||||
message.getType() == Message.Type.headline ||
|
||||
message.getType() == Message.Type.error) {
|
||||
isGroupChat ||
|
||||
broadcast ||
|
||||
message.getType() == Message.Type.normal ||
|
||||
message.getType() == Message.Type.headline ||
|
||||
message.getType() == Message.Type.error) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -333,15 +340,8 @@ public class Workspace extends JPanel implements PacketListener {
|
||||
// Ignore
|
||||
}
|
||||
|
||||
// Handle offline message.
|
||||
DelayInformation offlineInformation = (DelayInformation)message.getExtension("x", "jabber:x:delay");
|
||||
|
||||
if (offlineInformation != null && (Message.Type.chat == message.getType() || Message.Type.normal == message.getType())) {
|
||||
handleOfflineMessage(message);
|
||||
}
|
||||
|
||||
// Check for anonymous user.
|
||||
else if (room == null) {
|
||||
// Check for non-existent rooms.
|
||||
if (room == null) {
|
||||
createOneToOneRoom(bareJID, message);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user