conversejs / converse.js

Web-based XMPP/Jabber chat client written in JavaScript
http://conversejs.org
Mozilla Public License 2.0
3.08k stars 772 forks source link

XHR User Search #51

Closed vdurbha closed 11 years ago

vdurbha commented 11 years ago

Two questions regarding XHR User Search.

  1. Where should we set the portal_url variable? Is it a config variable for converse?
  2. What should be the response of the search-users service?
jcbrand commented 11 years ago

I added this feature to enable Plone integration for converse.js and since then there hasn't been any developments on this. I actually had to go and check my code to answer your question.

  1. Concerning the portal_url variable, in Plone this variable is global, so I didn't have to worry about it. The correct approach of course is to make this a config variable for converse. I'll make that change soon.
  2. search-users must return a a JSON encoded list of objects. Each object corresponds to a matched user and needs the keys id and fullname.
ruffles47 commented 10 years ago

Sir, First let me say, very nice work! A killer little Open Source IM in a space where very few such solutions exist. Thank you for sharing your work.

We are trying out the code and to that end, had a followup question to the one above regarding search and how the results are displayed.

We are using an open fire server with a search service plugin in conjunction with several xmpp clients (spark) These clients have a built in search that connects to the open fire search service.and in turn, displays the search results within the im client (spark)

Question: Does converse.js work the same way? If we configure the user_search_url to = our open fire server, will converse.js be able to connect to the open fire search service and return/display the search results?

Again, thanks for the code man. Any help you can give me here would be appreciated. I'll be returning the favor shortly....:)

jcbrand commented 10 years ago

Thanks @ruffles47

I've never used OpenFire and the XHR feature wasn't developed with OpenFire's search service in mind. Converse.js expects a JSON encoded list to be returned.

What does OpenFire's search service return?

You could always extend it to work with what OpenFire returns. The main code for that is here: https://github.com/jcbrand/converse.js/blob/master/converse.js#L1336

ruffles47 commented 10 years ago

Hey JC,

thanks again for the quick reply. I will put together a little info but in short, it is using the Xmpp protocol for "search service"

In the meantime, let me get the Boss to authorize a little $ to show our appreciation for the code and ur help like this reply.

AlSo , if we needed, might you be available for 15 or so hours of some work on converses for our needs ?

Ex :

  1. Persistent login
  2. Search for contact functionality

About me I work for a 25 b global company. I work for a small team that reports to the CIO . We work on next gen apps or innovative solutions. We are working on Xmpp clients when we came across converse. We might be able to engage on some config work so that u make some. $ and we can fast track a prototype of converse.

I have. 5 things to complete :

  1. Search / Add a contact through open fire
  2. Persistent login
  3. Add contact with jid prefix ( A00667 vs A00667@secureim. Arrow.comhttp://Arrow.com)
  4. Login user name with jid prefix vs entire jid ( see. 3)
  5. Launch a users converse I'm chat window from a link on a web page.

Ex: from a persons outlook vCard, click I'm icon and on a converse I'm chat with that user

Anyway, let me know what you think. Watch for $ from me, Arrow, mark Mosher or Phil Lembo. $ will come from one of us.

Thanks, Mike

Sent from my iPhone

On Nov 23, 2013, at 2:01 AM, "JC Brand" notifications@github.com<mailto:notifications@github.com> wrote:

Thanks @ruffles47https://github.com/ruffles47

I've never used OpenFire and the XHR feature wasn't developed with OpenFire's search service in mind. Converse.js expects a JSON encoded list to be returned.

What does OpenFire's search service return?

You could always extend it to work with what OpenFire returns. The main code for that is here: https://github.com/jcbrand/converse.js/blob/master/converse.js#L1336

— Reply to this email directly or view it on GitHubhttps://github.com/jcbrand/converse.js/issues/51#issuecomment-29127400.

ruffles47 commented 10 years ago

Hey JC, I wanted to provide you with some more info about OF (free open source sw from ignite real-time) and the xmpp jabber search service plugin.

Open Fire Openfire (formerly Wildfire) is a cross-platform real-time collaboration server based on the XMPP (Jabber) protocol. http://community.igniterealtime.org/message/227940?tstart=0#227940 Search Service Plugin Overview: The search plugin adds Jabber Search XEP-0055http://www.xmpp.org/extensions/xep-0055.html capabilities to Openfire. This plugin is designed to work with various Jabber clients to allow other users to search for users currently registered on the same server they are. We are currently using Spark IM, Pigeon IM, Claros IM and several other xmpp clients through the OF server. They all have the search service functionality built into the client which automatically detects and connects to the search service. I believe all the pieces to the puzz;le may already be in your code and just needs to be tweaked to connect to thisw service vs a plone environment.

Hope thgis sheds some light. Look forward to talking with you soon.

Mike

Michael Harvey Applications Engineer Global Collaboration Technology

Arrow Electronics 50 Marcus Drive Melville, NY 11747

P 631 327 6176 F 203 265 7988

mharvey@arrow.com arrow.comhttp://www.arrow.com/ [Arrow_Global_Logo]

From: MICHAEL HARVEY Sent: Monday, November 25, 2013 9:40 AM To: jcbrand/converse.js Cc: jcbrand/converse.js Subject: Converse IM developer discussion

Hey JC,

thanks again for the quick reply. I will put together a little info but in short, it is using the Xmpp protocol for "search service"

In the meantime, let me get the Boss to authorize a little $ to show our appreciation for the code and ur help like this reply.

AlSo , if we needed, might you be available for 15 or so hours of some work on converses for our needs ?

Ex :

  1. Persistent login
  2. Search for contact functionality

About me I work for a 25 b global company. I work for a small team that reports to the CIO . We work on next gen apps or innovative solutions. We are working on Xmpp clients when we came across converse. We might be able to engage on some config work so that u make some. $ and we can fast track a prototype of converse.

I have. 5 things to complete :

  1. Search / Add a contact through open fire
  2. Persistent login
  3. Add contact with jid prefix ( A00667 vs A00667@secureim. Arrow.comhttp://Arrow.com)
  4. Login user name with jid prefix vs entire jid ( see. 3)
  5. Launch a users converse I'm chat window from a link on a web page.

Ex: from a persons outlook vCard, click I'm icon and on a converse I'm chat with that user

Anyway, let me know what you think. Watch for $ from me, Arrow, mark Mosher or Phil Lembo. $ will come from one of us.

Thanks, Mike

Sent from my iPhone

On Nov 23, 2013, at 2:01 AM, "JC Brand" notifications@github.com<mailto:notifications@github.com> wrote:

Thanks @ruffles47https://github.com/ruffles47

I've never used OpenFire and the XHR feature wasn't developed with OpenFire's search service in mind. Converse.js expects a JSON encoded list to be returned.

What does OpenFire's search service return?

You could always extend it to work with what OpenFire returns. The main code for that is here: https://github.com/jcbrand/converse.js/blob/master/converse.js#L1336

Reply to this email directly or view it on GitHubhttps://github.com/jcbrand/converse.js/issues/51#issuecomment-29127400.

codebreaker90 commented 10 years ago

When i try to put an url to the xhr_user_search_url it will says "xhr_user_search_url is not defined" in my browser console. I had no idea what to put in this option. Did anyone make it work?