Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 93422 Details for
Bug 223577
Can't get VCard information from XMPP server
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
xmpp.patch
xmpp.patch (text/plain), 2.89 KB, created by
Hiroyuki
on 2008-03-25 12:24:16 EDT
(
hide
)
Description:
xmpp.patch
Filename:
MIME Type:
Creator:
Hiroyuki
Created:
2008-03-25 12:24:16 EDT
Size:
2.89 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.ecf.provider.xmpp >Index: src/org/eclipse/ecf/internal/provider/xmpp/XMPPContainerPresenceHelper.java >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.ecf/plugins/org.eclipse.ecf.provider.xmpp/src/org/eclipse/ecf/internal/provider/xmpp/XMPPContainerPresenceHelper.java,v >retrieving revision 1.32 >diff -u -r1.32 XMPPContainerPresenceHelper.java >--- src/org/eclipse/ecf/internal/provider/xmpp/XMPPContainerPresenceHelper.java 10 Mar 2008 00:28:48 -0000 1.32 >+++ src/org/eclipse/ecf/internal/provider/xmpp/XMPPContainerPresenceHelper.java 25 Mar 2008 16:21:06 -0000 >@@ -62,6 +62,7 @@ > import org.jivesoftware.smack.packet.Presence.Mode; > import org.jivesoftware.smack.packet.Presence.Type; > import org.jivesoftware.smackx.packet.VCard; >+import org.jivesoftware.smackx.packet.VCardTempXUpdateExtension; > > public class XMPPContainerPresenceHelper implements ISharedObject { > >@@ -539,9 +540,14 @@ > > protected XMPPID createIDFromName(String uname) { > try { >- if (uname.indexOf('@') == -1) { >- return new XMPPID(container.getConnectNamespace(), "admin" + "@" + uname); >- } >+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=221053 >+// --- Comment #5 From Hiroyuki 2008-03-17 10:38:54 -0500 [reply] --- >+// I think that you should not add "admin" when there is no fromID. >+// I always think the account "admin" to be no manager account. >+// The message can be sent to "admin" in the chat window. >+// if (uname.indexOf('@') == -1) { >+// return new XMPPID(container.getConnectNamespace(), "admin" + "@" + uname); >+// } > return new XMPPID(container.getConnectNamespace(), uname); > } catch (final Exception e) { > traceStack("Exception in createIDFromName", e); >@@ -575,19 +581,28 @@ > > private VCard getVCardForPresence(Presence xmppPresence) { > VCard result = null; >- if (xmppPresence.getExtension("x", "vcard-temp:x:update") != null) { >- final String from = xmppPresence.getFrom(); >+ if (xmppPresence.getExtension("x", "vcard-temp:x:update") == null) { >+ xmppPresence.addExtension(new VCardTempXUpdateExtension()); >+ } >+ //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 { >- result.load(container.getXMPPConnection(), from); >+ // from is "username@server/XMPP_ECF" >+ String userid = from; >+ int slash=userid.indexOf('/'); >+ if(slash>=0) >+ userid=userid.substring(0,slash); >+ //result.load(container.getXMPPConnection(), from); >+ result.load(container.getXMPPConnection(), userid); > addToCache(from, result); > } catch (final XMPPException e) { > traceStack("vcard loading exception", e); > } > } >- } >+ //} > return result; > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 223577
:
93214
| 93422