fix crash while destroying rooms (Christian Schneppe)

This commit is contained in:
12aw 2022-04-29 00:38:36 +02:00
parent 8fe3a19aae
commit 87de2963d1

View file

@ -786,17 +786,17 @@ public class ConversationsActivity extends XmppActivity implements OnConversatio
pendingViewIntent.push(intent);
}
} else if (intent != null && ACTION_DESTROY_MUC.equals(intent.getAction())) {
final Bundle extras = intent.getExtras();
if (extras != null && extras.containsKey("MUC_UUID")) {
Log.d(Config.LOGTAG, "Get " + intent.getAction() + " intent for " + extras.getString("MUC_UUID"));
Conversation conversation = xmppConnectionService.findConversationByUuid(extras.getString("MUC_UUID"));
try {
try {
final Bundle extras = intent.getExtras();
if (extras != null && extras.containsKey("MUC_UUID")) {
Log.d(Config.LOGTAG, "Get " + intent.getAction() + " intent for " + extras.getString("MUC_UUID"));
Conversation conversation = xmppConnectionService.findConversationByUuid(extras.getString("MUC_UUID"));
ConversationsActivity.this.xmppConnectionService.clearConversationHistory(conversation);
xmppConnectionService.destroyRoom(conversation, ConversationsActivity.this);
endConversation(conversation);
} catch (Exception e) {
e.printStackTrace();
}
} catch (Exception e) {
e.printStackTrace();
}
}
setIntent(createLauncherIntent(this));