mirror of
https://github.com/igniterealtime/Spark.git
synced 2025-10-29 11:47:01 +00:00
SPARK-2370: Show chat room event messages
When a chat room is destroyed, the user in the room gets to see a message explaining what happened. Spark should not assume that the server will provide this message. Show a default message in case the server doesn’t sent one.
This commit is contained in:
parent
7705a3e72c
commit
90defcc4bb
@ -735,7 +735,7 @@ public class GroupChatRoom extends ChatRoom
|
||||
{
|
||||
UIManager.put( "OptionPane.okButtonText", Res.getString( "ok" ) );
|
||||
JOptionPane.showMessageDialog( this,
|
||||
Res.getString( "message.room.destroyed", destroy.getReason() ),
|
||||
(destroy.getReason() != null ? Res.getString( "message.room.destroyed", destroy.getReason() ) : Res.getString( "message.room.destroyed.no.reason" )),
|
||||
Res.getString( "title.room.destroyed" ),
|
||||
JOptionPane.INFORMATION_MESSAGE );
|
||||
leaveChatRoom();
|
||||
@ -782,7 +782,11 @@ public class GroupChatRoom extends ChatRoom
|
||||
@Override
|
||||
public void kicked( EntityFullJid participant, Jid actor, String reason )
|
||||
{
|
||||
insertText( Res.getString( "message.user.kicked.from.room", participant.getResourcepart(), actor, reason ) );
|
||||
if (reason == null || reason.isEmpty()) {
|
||||
insertText(Res.getString("message.user.kicked.from.room.no.reason", participant.getResourcepart(), actor));
|
||||
} else {
|
||||
insertText(Res.getString("message.user.kicked.from.room", participant.getResourcepart(), actor, reason));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -800,7 +804,11 @@ public class GroupChatRoom extends ChatRoom
|
||||
@Override
|
||||
public void banned( EntityFullJid participant, Jid actor, String reason )
|
||||
{
|
||||
insertText( Res.getString( "message.user.banned", participant.getResourcepart(), reason ) );
|
||||
if (reason == null || reason.isEmpty()) {
|
||||
insertText(Res.getString("message.user.banned.no.reason", participant.getResourcepart()));
|
||||
} else {
|
||||
insertText(Res.getString("message.user.banned", participant.getResourcepart(), reason));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -617,6 +617,7 @@ message.restart.spark.changes = Plugin will be removed on the next startup of Sp
|
||||
message.restart.spark.to.install = You need to shut down the client to install latest version, would you like to do that now?
|
||||
message.restart.required = You will need to restart Spark to have your changes take effect, restart now?
|
||||
message.room.creation.error = The room could not be created
|
||||
message.room.destroyed.no.reason = This room has been destroyed.
|
||||
message.room.destroyed = This room has been destroyed due to the following reason: {0}
|
||||
message.room.destruction.reason = Reason for destroying the room?
|
||||
message.room.information.for = Room information for {0}
|
||||
@ -670,6 +671,7 @@ message.unrecoverable.error = Unknown connection error. Please review the logs f
|
||||
message.update.room.list = Update room list
|
||||
message.updating.cancelled = Updating has been canceled
|
||||
message.user.banned = {0} has been banned from this room. Reason: {1}
|
||||
message.user.banned.no.reason = {0} has been banned from this room.
|
||||
message.user.given.voice = {0} has been given a voice in this room
|
||||
message.user.granted.admin = {0} has been granted administrator privileges
|
||||
message.user.granted.membership = {0} has been given membership privileges
|
||||
@ -678,6 +680,7 @@ message.user.granted.owner = {0} has been granted owner privileges
|
||||
message.user.is.sending.you.a.file = {0} is sending you a file
|
||||
message.user.joined.room = {0} has joined the room
|
||||
message.user.kicked.from.room = {0} has been kicked out of the room by {1}. Reason: {2}
|
||||
message.user.kicked.from.room.no.reason = {0} has been kicked out of the room by {1}.
|
||||
message.user.left.room = {0} has left the room
|
||||
message.user.nickname.changed = {0} is now known as {1}
|
||||
message.user.now.available.to.chat = {0} is online at {1}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user