Bug 223577

Summary: Can't get VCard information from XMPP server
Product: [RT] ECF Reporter: Hiroyuki <hiroyuki.inaba>
Component: ecf.providersAssignee: ecf.core-inbox <ecf.core-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: caniszczyk, remy.suen, slewis
Version: unspecified   
Target Milestone: 2.0.1   
Hardware: PC   
OS: Windows Vista   
Whiteboard:
Attachments:
Description Flags
profile.png
none
xmpp.patch none

Description Hiroyuki CLA 2008-03-23 10:24:50 EDT
Build ID: 2.0.0.v20080310-1643

Can not get VCard information in XMPPContainerPresenceHelper.

1) In getVCardForPresence, PacketExtension (VCardTempXUpdateExtension)
   is not registered. 
2) Moreover, ID passed to the VCard.load method was wrong.

VCard was able to be acquired by correcting it as follows. 

private VCard getVCardForPresence(Presence xmppPresence) {
	VCard result = null;

1)	if (xmppPresence.getExtension("x", "vcard-temp:x:update") == null) {
1)		xmppPresence.addExtension(new VCardTempXUpdateExtension());
1)	}

	if (xmppPresence.getExtension("x", "vcard-temp:x:update") != null) {
		String from = xmppPresence.getFrom();
		result = getFromCache(from);
		if (result == null && from != null) {
			result = new VCard();
			try {
2)				String fromID = from;
2)				int slash=fromID.indexOf('/');
2)				if(slash>=0)
2)					fromID=fromID.substring(0,slash);
2)				result.load(container.getXMPPConnection(), /*from*/fromID);
				addToCache(from, result);
			} catch (final XMPPException e) {
				traceStack("vcard loading exception", e);
			}
		}
	}
	return result;
}
Comment 1 Hiroyuki CLA 2008-03-23 10:31:53 EDT
Created attachment 93214 [details]
profile.png

VCard information was able to be displayed

There seems to be a problem in the height of the tool-chip
Comment 2 Remy Suen CLA 2008-03-23 11:13:58 EDT
(In reply to comment #0)
> VCard was able to be acquired by correcting it as follows. 

Can you attach a patch to this bug?
Comment 3 Hiroyuki CLA 2008-03-25 12:24:16 EDT
Created attachment 93422 [details]
xmpp.patch

This is a patch of org.eclipse.ecf.provider.xmpp.
A patch of the Property view is not included.
Comment 4 Chris Aniszczyk CLA 2008-03-25 12:26:44 EDT
I just want to say thanks for all your recent contribution to ECF Hiroyuki.

Good to see new faces.
Comment 5 Scott Lewis CLA 2008-05-18 20:09:47 EDT
Setting target milestone to 2.0.1
Comment 6 Scott Lewis CLA 2014-02-14 11:21:30 EST
vcard support added long ago.