aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/entities/Conversation.java
diff options
context:
space:
mode:
authorkruks23 <scardenas@openmailbox.org>2014-05-19 20:21:25 +0200
committerkruks23 <scardenas@openmailbox.org>2014-05-19 20:21:25 +0200
commit2a1067b20a5c5b1948550e5370d3d8f02b2c557b (patch)
tree662d397934c2da03a4d1b6dbfaaf1a6f0cb9f71b /src/eu/siacs/conversations/entities/Conversation.java
parent7994b6866b7de4b266cf61d69e6c15c84bfd9c3a (diff)
parenta6f9a742c0dffeaa2f7fc26ad65e9c972a9d2288 (diff)
Merge branch 'development' of https://github.com/siacs/Conversations into development
Diffstat (limited to 'src/eu/siacs/conversations/entities/Conversation.java')
-rw-r--r--src/eu/siacs/conversations/entities/Conversation.java20
1 files changed, 3 insertions, 17 deletions
diff --git a/src/eu/siacs/conversations/entities/Conversation.java b/src/eu/siacs/conversations/entities/Conversation.java
index 88d6279e..e61537da 100644
--- a/src/eu/siacs/conversations/entities/Conversation.java
+++ b/src/eu/siacs/conversations/entities/Conversation.java
@@ -49,7 +49,6 @@ public class Conversation extends AbstractEntity {
private transient List<Message> messages = null;
private transient Account account = null;
- private transient Contact contact;
private transient SessionImpl otrSession;
@@ -129,19 +128,13 @@ public class Conversation extends AbstractEntity {
public String getName(boolean useSubject) {
if ((getMode() == MODE_MULTI) && (getMucOptions().getSubject() != null) && useSubject) {
return getMucOptions().getSubject();
- } else if (this.contact != null) {
- return this.contact.getDisplayName();
} else {
- return this.name;
+ return this.getContact().getDisplayName();
}
}
public String getProfilePhotoString() {
- if (this.contact == null) {
- return null;
- } else {
- return this.contact.getProfilePhoto();
- }
+ return this.getContact().getProfilePhoto();
}
public String getAccountUuid() {
@@ -153,14 +146,7 @@ public class Conversation extends AbstractEntity {
}
public Contact getContact() {
- return this.contact;
- }
-
- public void setContact(Contact contact) {
- this.contact = contact;
- if (contact != null) {
- this.contactUuid = contact.getUuid();
- }
+ return this.account.getRoster().getContact(this.contactJid);
}
public void setAccount(Account account) {