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;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private User findUserByRealJid(Jid jid) {
|
public User findUserByRealJid(Jid jid) {
|
||||||
if (jid == null) {
|
if (jid == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -339,7 +339,13 @@ public class AvatarService implements OnAdvancedStreamFeaturesLoaded {
|
||||||
if (c != null && (c.getProfilePhoto() != null || c.getAvatar() != null)) {
|
if (c != null && (c.getProfilePhoto() != null || c.getAvatar() != null)) {
|
||||||
return get(c, size, cachedOnly);
|
return get(c, size, cachedOnly);
|
||||||
} else if (message.getConversation().getMode() == Conversation.MODE_MULTI){
|
} 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) {
|
if (user != null) {
|
||||||
return getImpl(user,size,cachedOnly);
|
return getImpl(user,size,cachedOnly);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue