mirror of
https://github.com/igniterealtime/Spark.git
synced 2026-02-05 04:15:33 +00:00
SPARK-2476: Improve error message when failing to join a chatroom
This adds a reference to the room that was being joined, and adds a more descriptive cause of the failure.
This commit is contained in:
@ -320,7 +320,7 @@ public class ConferenceUtils {
|
||||
case registration_required:
|
||||
return Res.getString("message.error.not.member");
|
||||
default:
|
||||
String reason = error.getConditionText() == null ? error.getCondition().toString() : error.getConditionText();
|
||||
String reason = error.getDescriptiveText() == null ? error.getCondition().toString() : error.getDescriptiveText();
|
||||
return Res.getString("message.default.error") + ": " + reason;
|
||||
}
|
||||
|
||||
|
||||
@ -249,7 +249,9 @@ public class JoinRoomSwingWorker extends SwingWorker
|
||||
if ( errors.size() > 0 )
|
||||
{
|
||||
String error = errors.get( 0 );
|
||||
JOptionPane.showMessageDialog( SparkManager.getMainWindow(), error, Res.getString("message.error.unable.join.room"), JOptionPane.ERROR_MESSAGE );
|
||||
final String style = "width: 300px;";
|
||||
String body = "<html><body><p style='"+style+"'>"+ roomJID + ": " + Res.getString("message.error.unable.join.room") +"</p><p></p><p style='"+style+"'>" + error + "</p></body></html>";
|
||||
JOptionPane.showMessageDialog( SparkManager.getMainWindow(), body, Res.getString("message.error.unable.join.room"), JOptionPane.ERROR_MESSAGE );
|
||||
}
|
||||
else if ( groupChat.isJoined() && getValue() != null )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user