mirror of
https://github.com/moparisthebest/Conversations
synced 2024-11-28 03:32:15 -05:00
fixed users profile picture
This commit is contained in:
parent
b6ea028a9d
commit
36dccb9f77
@ -161,7 +161,7 @@ public class OtrEngine implements OtrEngineHost {
|
|||||||
packet.addChild("private","urn:xmpp:carbons:2");
|
packet.addChild("private","urn:xmpp:carbons:2");
|
||||||
packet.addChild("no-copy","urn:xmpp:hints");
|
packet.addChild("no-copy","urn:xmpp:hints");
|
||||||
packet.setType(MessagePacket.TYPE_CHAT);
|
packet.setType(MessagePacket.TYPE_CHAT);
|
||||||
Log.d(LOGTAG,packet.toString());
|
//Log.d(LOGTAG,packet.toString());
|
||||||
account.getXmppConnection().sendMessagePacket(packet);
|
account.getXmppConnection().sendMessagePacket(packet);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -219,7 +219,6 @@ public class Conversation extends AbstractEntity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void startOtrSession(Context context, String presence) {
|
public void startOtrSession(Context context, String presence) {
|
||||||
Log.d("xmppService", "starting otr session with " + presence);
|
|
||||||
SessionID sessionId = new SessionID(this.getContactJid(), presence,
|
SessionID sessionId = new SessionID(this.getContactJid(), presence,
|
||||||
"xmpp");
|
"xmpp");
|
||||||
this.otrSession = new SessionImpl(sessionId, getAccount().getOtrEngine(
|
this.otrSession = new SessionImpl(sessionId, getAccount().getOtrEngine(
|
||||||
|
@ -37,6 +37,7 @@ public class MessageParser {
|
|||||||
String body = packet.getBody();
|
String body = packet.getBody();
|
||||||
if (!conversation.hasValidOtrSession()) {
|
if (!conversation.hasValidOtrSession()) {
|
||||||
if (properlyAddressed) {
|
if (properlyAddressed) {
|
||||||
|
Log.d("xmppService","starting new otr session with "+packet.getFrom()+" because no valid otr session has been found");
|
||||||
conversation.startOtrSession(service.getApplicationContext(), fromParts[1]);
|
conversation.startOtrSession(service.getApplicationContext(), fromParts[1]);
|
||||||
} else {
|
} else {
|
||||||
Log.d("xmppService",account.getJid()+": ignoring otr session with "+fromParts[0]);
|
Log.d("xmppService",account.getJid()+": ignoring otr session with "+fromParts[0]);
|
||||||
@ -47,6 +48,7 @@ public class MessageParser {
|
|||||||
if (!foreignPresence.equals(fromParts[1])) {
|
if (!foreignPresence.equals(fromParts[1])) {
|
||||||
conversation.resetOtrSession();
|
conversation.resetOtrSession();
|
||||||
if (properlyAddressed) {
|
if (properlyAddressed) {
|
||||||
|
Log.d("xmppService","replacing otr session with "+packet.getFrom());
|
||||||
conversation.startOtrSession(service.getApplicationContext(), fromParts[1]);
|
conversation.startOtrSession(service.getApplicationContext(), fromParts[1]);
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
|
@ -305,6 +305,7 @@ public class UIHelper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static Bitmap getSelfContactPicture(Account account, int size, boolean showPhoneSelfContactPicture, Activity activity) {
|
public static Bitmap getSelfContactPicture(Account account, int size, boolean showPhoneSelfContactPicture, Activity activity) {
|
||||||
|
if (showPhoneSelfContactPicture) {
|
||||||
Uri selfiUri = PhoneHelper.getSefliUri(activity);
|
Uri selfiUri = PhoneHelper.getSefliUri(activity);
|
||||||
if (selfiUri != null) {
|
if (selfiUri != null) {
|
||||||
try {
|
try {
|
||||||
@ -315,5 +316,8 @@ public class UIHelper {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return getUnknownContactPicture(account.getJid(), size);
|
return getUnknownContactPicture(account.getJid(), size);
|
||||||
|
} else {
|
||||||
|
return getUnknownContactPicture(account.getJid(), size);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user