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:
Guus der Kinderen
2026-01-06 09:42:29 +01:00
parent 22736e0fd8
commit 24c4fa5ff1
2 changed files with 4 additions and 2 deletions

View File

@ -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;
}

View File

@ -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 )
{