mirror of
https://github.com/moparisthebest/Conversations
synced 2024-11-28 11:42:15 -05:00
fixed #254
This commit is contained in:
parent
22e504b8f9
commit
185c485fc6
@ -141,7 +141,8 @@ public class Conversation extends AbstractEntity {
|
||||
if ((getMode() == MODE_MULTI) && (getMucOptions().getSubject() != null)
|
||||
&& useSubject) {
|
||||
return getMucOptions().getSubject();
|
||||
} else if (getMode() == MODE_MULTI && bookmark!=null && bookmark.getName() != null) {
|
||||
} else if (getMode() == MODE_MULTI && bookmark != null
|
||||
&& bookmark.getName() != null) {
|
||||
return bookmark.getName();
|
||||
} else {
|
||||
return this.getContact().getDisplayName();
|
||||
@ -391,4 +392,13 @@ public class Conversation extends AbstractEntity {
|
||||
public Bookmark getBookmark() {
|
||||
return this.bookmark;
|
||||
}
|
||||
|
||||
public void failWaitingOtrMessages() {
|
||||
for (Message message : this.messages) {
|
||||
if (message.getEncryption() == Message.ENCRYPTION_OTR
|
||||
&& message.getStatus() == Message.STATUS_WAITING) {
|
||||
message.setStatus(Message.STATUS_SEND_FAILED);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -532,11 +532,13 @@ public class XmppConnectionService extends Service {
|
||||
}
|
||||
} else if (message.getEncryption() == Message.ENCRYPTION_DECRYPTED) {
|
||||
message.getConversation().endOtrIfNeeded();
|
||||
message.getConversation().failWaitingOtrMessages();
|
||||
packet = mMessageGenerator.generatePgpChat(message);
|
||||
message.setStatus(Message.STATUS_SEND);
|
||||
send = true;
|
||||
} else {
|
||||
message.getConversation().endOtrIfNeeded();
|
||||
message.getConversation().failWaitingOtrMessages();
|
||||
if (message.getConversation().getMode() == Conversation.MODE_SINGLE) {
|
||||
message.setStatus(Message.STATUS_SEND);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user