OpenFire + FastPath WebChat - Pre Fill the User Chat Window with ongoing Conversation - xmpp

Currently I am using Olark for live chat on my website.
I am planning to replace it with an in house OpenFire installation.
However, there is one problem.
With Olark live chat snippet (which I embed on my website) - if a user opens the website in multiple tabs - it's prefilled with the ongoing conversation. For e.g. - you can try it on (moonclerk.com).
How do I achieve the same pre population of chat window with the ongoing conversation with OpenFire + FP WebChat?

The way we achieve it at Olark is not exactly trivial. We don't actually use an XMPP client on the end-user's side, which makes it a bit easier, but basically our transport layer is able to grab conversation events for a conversation in-progress based on a session UUID that is stored in the user's cookies. XMPP isn't involved in that process at all, for us (it is only concerned with final delivery to and from Operators).
I don't know what FastPath's architecture is like, but if you were looking for this functionality, or to add it yourself, XMPP supports retrieving some n number of messages from the message history for a client. Check out XMPPFramework - Retrieve Archived Messages From Openfire Server for more on that.

Related

XMPP support for avatars in multi-user chat

I'm creating (yet another) mobile chat app, using Smack and ejabberd. I'm trying to ascertain the best way to implement user avatars for use in multi-user chat rooms, and also of course for roster members. Looking at possible solutions, I can see:
XEP-0008 IQ based avatars - avatars are limited to 64 by 64 pixels, too small.
XEP-0153 vCard based avatars - Easy to implement for both users in the roster and MUC rooms, however (a) sources such as this seem to indicate that one's own vcard needs to be downloaded on every login (is this strictly true? I can't see this in the specs), and (b) should be less than 96 by 96 pixels (still pretty small)
XEP-0084 User Avatar based on Personal Eventing Protocol - I'm not clear how I can retrieve avatars for all users in a multi-user chat room based on this protocol. After joining the chat room, I would need to subscribe to the metadata node of all users, and any subsequently joining users? And also unsubscribe when they leave the room? I figure this would be pretty ugly and clumsy to implement.
Can someone kindly point me in the right direction, or indicate where I may have misunderstood? Thanks.
I guess the best way to address this issue may be to store/load the images Out of band via a HTTP server. Images could be stored with a filename such as "username_imagehash.xxx". For users not in one's roster (eg strangers in a multi-user chat), we pull their avatar via a URI retrieved from their vCard PHOTO field. Each time a stranger is re/encountered, we reload their vCard, and can identify the need to redownload their photo via a change in the URI in the vCard.
Once the user is added to one's roster, we subscribe to their avatar updates via XEP-0084, publishing the same URI (see example 4. in XEP-0084).
I think this addresses all requirements, I will find out once I've implemented. I can understand that it is not done this way in standard XMPP clients as it depends on an HTTP server separate to the XMPP service (and need to handle HTTP server security - user authorization/authentication).
Feedback welcome!

xmpp protocol decentralized actual meaning?

I just started working on xmpp its wiki page says that "The architecture of the XMPP network is similar to email; anyone can run their own XMPP server and there is no central master server."Hence it is decentralized
In my application I want that user can create a specific group chat box on a click of button.
My question is if the main user who created chatbox become offline will the chat box created by him will remain alive as decentralized suggest that user who created will act as a server. If not , could anyone suggest what can be done for keeping chatboxes alive even when the user become offline.
Multi User Chats (called 'MUC' in the XMPP world) are hosted by a XMPP component. This means that the user who initiated the chat *does not act as chat provider, but this particular MUC component. This component runs usually on the same machine as your XMPP server. Therefore the chat exists - if the MUC is marked as permanent - even if the user quits the chat.
More information can be found in XEP-0045: Multi-User Chat

xmpp/jabber for chat for dating site?

we're in the process of adding text chat to our dating site and I'm considering using xmpp - specifically ejabberd on the server side, and we will be implementing an ajax client.
i'd like to hear from someone with good xmpp experience - is it architecturally suitable for chat on a dating site ? in chat on a dating site anybody can chat one-on-one with anybody - they don't have to be on your 'friends' list. Also we do not want a chat room - only one-on-one chat.
Or is xmpp more suitable for the model where someone has to add you to their friends list before you can with them ?
thanks in advance.
XMPP should work fine for you. Ejabberd, depending on the number of concurrent users you have, should be a fine starting point. Consider using a BOSH library like Strophe.js in your HTML client. If you use that library, you'll want a copy of Professional XMPP Programming with JavaScript and jQuery, which has examples of all of the code you'll need.
You do NOT need to have presence subscriptions in place to send chat messages between users, except in specific server implementations like GoogleTalk. Reducing the number of presence subscriptions will also drastically increase the number of users you can handle concurrently.

Creating a chat feature?

I need to include chat, in my application. People sign in the chat and create their user and chat to other users. However it needs to be like facebook chat or pingchat where you add friends you want to talk to.
Can anyone give me pointers to what i need to do? I've heard about xmpp servers but not sure if that is the right thing for my app. Any help would be much appreciated
Thanks
Is your app going to create new users, and add them in the chat list, or going to use existing users (like Gtalk, Y! Messenger etc) on existing protocols (like IRC, XMPP etc)...?
If you are going to implement your own chat system, where your users are registering in your website, then you are going to do these things:
Setup your website
Create a protocol (that's, how you pass messages)
Write and implement an API (in PHP, ASP etc)
Connect that API with your iPhone app.
How it works?
You keep a table of chat messages. The table include:
Chat_From
Chat_To
Chat_Message
Timestamp
All what you do is, when you start a Chat session from Alice to Bob, you just enter them in the table. Next, you fetch the row from the Web Server to your App, by calling your PHP file (say, http://mychatserver.com/getChat.php) based on the condition SELECT CHAT_MESSAGE FROM CHAT_TABLE WHERE CHAT_FROM="ALICE" AND CHAT_TO="BOB";. This message is displayed in your App.
This process should be performed repeatedly, with an interval of, say 1 sec.
I hope you got this idea.

UCMA: Chat with users not in AD

a customer wants enable a chat/instant messenger for his application webside. He is using Lync Server internally to Chat in-house. Now, he requires the following:
A external user (which will not be an AD user) logs into the webside is able to chat with a person inside the company. The internal user will receive those messages via his lync client.
What's the best way to achieve this?
i thought about bot that delegates messages from the webside to the lync server that does the rest. But how can i send a message as an external user?
The usual way to approach this is with the following components:
A bot that connects to the internal Lync infrastructure as an ApplicationEndpoint, and manages conversations with external/internal users
A Web or WCF service that exposes methods over http to external users - this could be built into the bot, or could be a separate service that communicates with the bot in some way
The web UI for presenting a users presence, allowing click-to-call, initiating and displaying a conversation etc
As an example, the WCF service could expose a few methods:
GetPresence(targetSipUri) - returns a presence value for the given uri
SendIM(targetSipUri, message) - sends an IM to the given uri
GetReplies() - polls for any responses
When you get into the detail you might need more methods - e.g. it may be an idea to generate a conversation token and pass this around
The web UI could present a list of contacts with a presence status (GetPresence), then allow the user to click a presence contact to initiate a new conversation window and send the inital message (SendIM), then poll the service for any replies from the contact (GetReplies) - note, the bot will have to queue replies internally until GetReplies is called.
There are commercial products that might meet your needs - a quick search for Lync webchat should turn up a few. Also, it may be worth looking into the Lync Web App, to see if this works for your customer
Edit: In answer to the comment below - yes, your internal users will see a conversation from "Our Lync Bot". If you don't know who your users are (e.g. random potential customers browsing a shopping site), you can grab some info from them (name, product to discuss etc) and have the bot display this to the internal user, either as part of the IM conversation, or as conversation context displayed in a Conversation Window Extension.
If your external users are known in advance (e.g. registered customers), and the internal user MUST see the conversation as being from them, then you will need to create a UserEndpoint for each conversation - but this would rely on having the user in AD.