aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations/services
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2015-12-09 10:30:26 +0100
committerChristian S <christian@pix-art.de>2015-12-12 15:50:30 +0100
commit751f92fa2d7606fbc78085cb5ff7688b71f21d87 (patch)
tree4a0bd9f3f5db9ccb141921ef956ad30766ac6436 /src/main/java/eu/siacs/conversations/services
parent911a8ab9e757947560ac4b4b7f1c35d0fda173fa (diff)
when no avatar found show avatar of contact and not the muc user in conferences
Diffstat (limited to 'src/main/java/eu/siacs/conversations/services')
-rw-r--r--src/main/java/eu/siacs/conversations/services/AvatarService.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main/java/eu/siacs/conversations/services/AvatarService.java b/src/main/java/eu/siacs/conversations/services/AvatarService.java
index 899cbf9ea..bdeab06a8 100644
--- a/src/main/java/eu/siacs/conversations/services/AvatarService.java
+++ b/src/main/java/eu/siacs/conversations/services/AvatarService.java
@@ -77,7 +77,12 @@ public class AvatarService {
avatar = mXmppConnectionService.getFileBackend().getAvatar(user.getAvatar(), size);
}
if (avatar == null) {
- avatar = get(user.getName(), size, cachedOnly);
+ Contact contact = user.getContact();
+ if (contact != null) {
+ avatar = get(contact, size, cachedOnly);
+ } else {
+ avatar = get(user.getName(), size, cachedOnly);
+ }
}
this.mXmppConnectionService.getBitmapCache().put(KEY, avatar);
return avatar;