mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-14 00:02:05 +01:00
Fix NPE if MUC occupants cannot be retrieved
This commit is contained in:
parent
15083fa3b0
commit
7a4977181f
1 changed files with 5 additions and 1 deletions
|
@ -1187,10 +1187,14 @@ public abstract class OmemoService<T_IdKeyPair, T_IdKey, T_PreKey, T_SigPreKey,
|
|||
MultiUserChat muc = getMuc(manager.getConnection(), stanza.getFrom());
|
||||
if (muc != null) {
|
||||
Occupant occupant = muc.getOccupant(stanza.getFrom().asEntityFullJidIfPossible());
|
||||
if (occupant == null) {
|
||||
LOGGER.log(Level.WARNING, "Cannot decrypt OMEMO MUC message; MUC Occupant is null.");
|
||||
return;
|
||||
}
|
||||
Jid occupantJid = occupant.getJid();
|
||||
|
||||
if (occupantJid == null) {
|
||||
LOGGER.log(Level.WARNING, "MUC message received, but there is no way to retrieve the senders Jid. " +
|
||||
LOGGER.log(Level.WARNING, "Cannot decrypt OMEMO MUC message; Senders Jid is null. " +
|
||||
stanza.getFrom());
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue