You are here

Using Friendica’s chat plugin

A plugin called jappixmini provides Facebook-style chat within your browser for Friendica. It uses a technology called XMPP (also known as Jabber) to do this. If you are a user on someone else’s site, you’ll find instructions on configuring the plugin in the top sections of this how-to. If you run your own site, please read the last two sections first.

Using the plugin - prerequisites

To use XMPP with anything, you need a separate XMPP account on an XMPP server. There's an inconvenient aspect to this - you need to acquire one. But on the plus side, that only takes two minutes, costs nothing and gives you a service you can also use with several other platforms or on its own.

In future versions, the jappixmini plugin may optionally set up an XMPP account for you to use with Friendica. But at present, you have to use an existing account elsewhere. If you already have an XMPP account, jump to the next section.

Otherwise, getting such an account is very easy. Just search the web for a service. Free XMPP servers are about as common as pizza parlors. Choose one and sign up. Or install your own XMPP server if you’re a tech-savvy person and have a suitable hosting deal. If you’re a member of someone else’s Friendica site, it’s also possible that your admin will have an XMPP server you can use. If you can't be bothered to search for a server, take a look here: http://xmpp.net/.

Settings

When you have your XMPP account, visit Settings -> Plugin Settings and find the jappixmini section. If it’s not there, your admin hasn’t activated the plugin yet. Patience or a private message are the recommended remedies.

Enter your user name and XMPP server. For instance, if you are bob@chatalot.com, your user name is bob and the server is chatalot.com. For more security, optionally also activate encryption of your XMPP password (which you received when you set up your XMPP account) with your Friendica password. Check the boxes to Approve subscription requests from Friendica contacts automatically and to Subscribe to Friendica contacts automatically (if you leave these unchecked, you will have to set up all your Friendica chat contacts manually).

Finally, choose a BOSH server to use. In general, the one suggested in your settings panel is a good choice, but if you know of another one, you can try it. Note that not all BOSH servers which work for other applications you may be using will work for the plugin. If you get an error after plugin activation, it possibly means that the BOSH server you have specified doesn’t work in this particular environment.

At this point, it’s important to note that a BOSH server converts XMPP communication into a format web browsers can read. That means that the person running the BOSH server could probably actually see your dialogues if he/she so wished. So trust is an important factor here.

Once you have activated the plugin, give it about 15 to 30 minutes. It will automatically add chat connections for those of your Friendica contacts who are also using it (and have enabled auto-approval).

You can also manually add XMPP contacts that aren't from Friendica - anyone you know who has an XMPP account. To do this, you revisit the settings page and enter their XMPP/Jabber addresses (e.g. friend@friend.net), then press the button to add the contact.

Use the Facebook chat server instead?

In special cases, you might wish to forgo chat with your Friendica contacts and integrate Facebook chat instead. This probably makes sense if most of your friends are still using Facebook. To do this, you can leave the options Approve subscription requests from Friendica contacts automatically and Subscribe to Friendica contacts automatically unchecked. Then enter chat.facebook.com as your XMPP server. You also need to enter a username for Facebook. Note that you may not have a username there yet, even though you have been a member for years and have been using their browser chat. No problem: go to the Facebook website and configure one (Account → Account Settings → Username). Your password will automatically be your standard Facebook password.

The flipside of this configuration option for the plugin is that it restricts chat to your Facebook contacts – so Friendica contacts don’t get included.

One note on use with Facebook: Your plugin may be configured to use the Jappix BOSH server. In this case, you may get an email from Facebook upon initial use, informing you that your Facebook account has been locked, because someone has been trying to access it from a computer in Paris. That is because the Jappix BOSH server is located there, so you can safely reactivate your account (barring any unlikely coincidences that a real spy in Paris has been trying to hack it).

Use a native chat client?

The chat account and contacts you have now set up don’t need Friendica to function. You can also use them with native XMPP clients on your PC or mobile device – for more convenience, mobility or flexibility. Most native clients can also handle more than one account simultaneously - so you could run Friendica and Facebook chat the same time. We have detailled information on that here: http://friendica.com/node/20. One thing to remember is that native clients interfere with the way the plugin functions - they generally take precedence. If you run a native client and the  plugin simulaneously, messages and contact requests will normally not reach the plugin, but will appear in the client. Frustratingly perhaps, this will also happen if you leave a client running at home and then expect to be able to use the plugin in an internet cafe or at work. In such cases, only a mobile client on a cellphone (for example) will give you unhampered access to XMPP communication, especially incoming messages.

(If you feel up to some advanced configuration, you can change this behaviour by looking into client priorities. See here: http://blog.roobix.net/2010/02/jabber-xmpp-resources-and-priorities.html.)

Easy installation (for admins)

To install the plugin as an admin, simply activate it on your Plugin page. On its own settings page, you will be able to change the text that is issued to users, which suggests a BOSH server to use. If you know of a public one that works for everyone and wish to recommend it, do so here. Otherwise, leave everything as it is.

Advanced installation

If you want to set up your own BOSH server, you need to know that there are two different types: the built-in BOSH servers that come with XMPP servers like eJabberd and so-called standalone servers. The built-in variety will only function for the XMPP server it comes with. Configuring for it will therefore restrict your users – they will need a chat account on the specific XMPP server (probably yours). The standalone type does not have this restriction. In both cases, configuration and management is not exactly trivial – especially if you want a BOSH server that will work for people behind company firewalls. Since the plugin uses Jappix, you will need to consult the Jappix documentation to set up a Bosh server correctly. Go here for more: https://github.com/jappix/jappix/wiki/BoshServer  Depending on your choices, you may then need to edit the Jappix configuration files manually. Find these here: ./addon/jappixmini/jappix/store/conf

If you make such changes, also change the plugin text to reflect them – so that your users are informed automatically when they configure the plugin for themselves.

One important note: If you install your own BOSH server and proxy it on port 443 (https), you may be using a self-signed ssl certificate. In that case, you will need to accept the certificate manually (once) with every browser you use - by explicitly pointing the browser to your BOSH proxy URL (e.g. https://mybosh.com/). The plugin itself does not give you the opportunity to accept self-signed certificates (and will probably just fail if your browser doesn't know them). Since this workaround only functions for some browsers (like Firefox) and needs to be understood by everyone using your site, a trusted ssl certificate would obviously be a much better option for a public Friendica server.  Either way, an https proxy is highly advisable. Otherwise, users will have to enter URLs like http://yourserver.com:5280/http-bind/ - which will a) be blocked by some firewalls, and b) result in unencrypted communication.

Note: Jappix requests that people running big public servers actually do provide their own BOSH servers. The official Jappix BOSH server is really only intended for use by individuals. If you are running a big site and want to use the Jappix BOSH server, please consider making a donation to Jappix.

 

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer