fix wrong avatar shown when true jid doesn't match in muc
This commit is contained in:
parent
cb80e64d2c
commit
7ab8ed625d
|
@ -511,7 +511,7 @@ public class MucOptions {
|
|||
return null;
|
||||
}
|
||||
|
||||
private User findUserByRealJid(Jid jid) {
|
||||
public User findUserByRealJid(Jid jid) {
|
||||
if (jid == null) {
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -339,7 +339,13 @@ public class AvatarService implements OnAdvancedStreamFeaturesLoaded {
|
|||
if (c != null && (c.getProfilePhoto() != null || c.getAvatar() != null)) {
|
||||
return get(c, size, cachedOnly);
|
||||
} else if (message.getConversation().getMode() == Conversation.MODE_MULTI){
|
||||
MucOptions.User user = conversation.getMucOptions().findUserByFullJid(message.getCounterpart());
|
||||
final Jid trueCounterpart = message.getTrueCounterpart();
|
||||
MucOptions.User user;
|
||||
if (trueCounterpart != null) {
|
||||
user = conversation.getMucOptions().findUserByRealJid(trueCounterpart);
|
||||
} else {
|
||||
user = conversation.getMucOptions().findUserByFullJid(message.getCounterpart());
|
||||
}
|
||||
if (user != null) {
|
||||
return getImpl(user,size,cachedOnly);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue