Bug 223577 - Can't get VCard information from XMPP server
Summary: Can't get VCard information from XMPP server
Status: RESOLVED FIXED
Alias: None
Product: ECF
Classification: RT
Component: ecf.providers (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows Vista
: P3 normal (vote)
Target Milestone: 2.0.1   Edit
Assignee: ecf.core-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-23 10:24 EDT by Hiroyuki CLA
Modified: 2014-02-14 11:21 EST (History)
3 users (show)

See Also:


Attachments
profile.png (36.02 KB, image/png)
2008-03-23 10:31 EDT, Hiroyuki CLA
no flags Details
xmpp.patch (2.89 KB, patch)
2008-03-25 12:24 EDT, Hiroyuki CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.