some fixes for otr with multiple parties
This commit is contained in:
parent
5d4efe0826
commit
dfbc42ecd7
|
@ -56,7 +56,7 @@ public class MessageParser extends AbstractParser {
|
||||||
String foreignPresence = conversation.getOtrSession()
|
String foreignPresence = conversation.getOtrSession()
|
||||||
.getSessionID().getUserID();
|
.getSessionID().getUserID();
|
||||||
if (!foreignPresence.equals(fromParts[1])) {
|
if (!foreignPresence.equals(fromParts[1])) {
|
||||||
conversation.resetOtrSession();
|
conversation.endOtrIfNeeded();
|
||||||
if (properlyAddressed) {
|
if (properlyAddressed) {
|
||||||
conversation.startOtrSession(
|
conversation.startOtrSession(
|
||||||
mXmppConnectionService.getApplicationContext(),
|
mXmppConnectionService.getApplicationContext(),
|
||||||
|
@ -90,6 +90,10 @@ public class MessageParser extends AbstractParser {
|
||||||
finishedMessage.setTime(getTimestamp(packet));
|
finishedMessage.setTime(getTimestamp(packet));
|
||||||
return finishedMessage;
|
return finishedMessage;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
String receivedId = packet.getId();
|
||||||
|
if (receivedId!=null) {
|
||||||
|
mXmppConnectionService.replyWithError(account,packet);
|
||||||
|
}
|
||||||
conversation.resetOtrSession();
|
conversation.resetOtrSession();
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1474,4 +1474,9 @@ public class XmppConnectionService extends Service {
|
||||||
public PowerManager getPowerManager() {
|
public PowerManager getPowerManager() {
|
||||||
return this.pm;
|
return this.pm;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void replyWithError(Account account, MessagePacket packet) {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue