manual.rst 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. .. raw:: html
  2. <div id="banner"><a href="https://github.com/jcbrand/converse.js/blob/master/docs/source/manual.rst">Edit me on GitHub</a></div>
  3. ===========================
  4. The Converse.js User Manual
  5. ===========================
  6. .. |br| raw:: html
  7. <br />
  8. .. contents:: Table of Contents
  9. :depth: 2
  10. :local:
  11. .. figure:: images/homepage.jpg
  12. :align: right
  13. :alt: The converse.js website
  14. The converse.js website
  15. **Welcome to the converse.js user manual**. This manual is very much still a work
  16. in progress and is far from complete. Please bear in mind that it's the work of volunteers.
  17. If you have requests or suggestions on how the manual can be improved or
  18. expanded, then please `contact me <https://opkode.com/contact.html>`_
  19. or create a new ticket on `Github <https://github.com/jcbrand/converse.js/issues>`_.
  20. Although converse.js can be integrated into any website, for this user manual
  21. we'll refer to the canonical version at https://conversejs.org.
  22. This documentation also integrates the converse.js chat client, so you can try
  23. out some of the steps right on this page! Just click the **Toggle chat** button
  24. at the bottom right of the page to open the so-called *control box* of the
  25. converse.js chat client.
  26. Registering a new chat account
  27. ==============================
  28. .. figure:: images/register-panel.jpg
  29. :align: left
  30. :alt: The registration panel of the converse.js control box.
  31. The registration panel of converse.js
  32. With converse.js you can register a new XMPP account on any publically available XMPP provider.
  33. To do so, click the **Register** tab on the chat client.
  34. You will then see the *registration panel* as shown in the picture below.
  35. Choosing your provider
  36. ----------------------
  37. Converse.js uses a chat protocol called XMPP (also known as Jabber) which allows "federation".
  38. This means that it's similar to email, in the sense that people signed in at
  39. different XMPP chat providers can still chat with one another.
  40. For example, if you have a Yahoo! email account, you can send and receive emails from
  41. a friend with a Google email account. In the same way, if you have a chat
  42. account from **Conversejs.org**, you can send and receive chat messages with a
  43. friend who has an account at `Jappix.com <https://jappix.com>`_.
  44. There are many free providers online which allow you to register a new account.
  45. You can see a list of some of them at `xmpp.net <https://xmpp.net/directory.php>`_.
  46. The `xmpp.net <https://xmpp.net/directory.php>`_ website provides a security grading
  47. for the XMPP servers of the providers, which is very useful. They are however sometimes
  48. slow to add new servers to the list.
  49. A larger list of XMPP providers is also available at `list.jabber.net <https://list.jabber.at/>`_.
  50. You can find the domain name for a server under the *Domain* column at
  51. `xmpp.net <https://xmpp.net/directory.php>`_. or the *Server* column at
  52. `list.jabber.net <https://list.jabber.at/>`_.
  53. Once you know which XMPP provider you'd like to use, you can type its domain
  54. name and click the **Fetch registration form** button.
  55. |br|
  56. .. figure:: images/register-form.jpg
  57. :align: left
  58. :alt: The registration form for an XMPP account at conversejs.org
  59. The registration form
  60. Filling out the registration form
  61. ---------------------------------
  62. After you've clicked **Fetch registration form**, the chat client will contact
  63. the chat provider, ask for its registration form and then present it to you.
  64. Different chat providers have different registration forms, but they're all
  65. relatively similar.
  66. Check the security score
  67. ~~~~~~~~~~~~~~~~~~~~~~~~
  68. At the top of the form you'll see a colored bar containing the text **xmpp.net score**.
  69. This shows the security score for this server as determined by `xmpp.net <https://xmpp.net>`_
  70. where you can test out a server for yourself. You should generally avoid providers with
  71. a poor security score (colored in red).
  72. Choosing a username
  73. ~~~~~~~~~~~~~~~~~~~
  74. As you can see in the registration form, the **username** consists of two
  75. parts separated with an **@** sign, similar to an email address.
  76. The first part is your unique *handle* which you need to choose. The second part
  77. is the domain name of the chat provider, the one which you chose in the previous step
  78. when you fetched the registration form.
  79. When you want to give someone your XMPP chat username, or when you want to add
  80. someone else as a contact, you need to specify it in full, like you would an email address.
  81. Once you've chosen your user name and password, click **Register**. If
  82. Successful, you'll be automatically logged in to your new account.
  83. |br|
  84. .. figure:: images/add-contact.png
  85. :align: left
  86. :alt: Adding a contact in converse.js
  87. The form for adding a new contact
  88. Adding a contact
  89. ================
  90. In order to start chatting with someone, you first need to add them as a contact.
  91. To do this, click the **Add a contact** link in the **Contacts** tab. This will
  92. slide open a dropdown in which you can type the username of the person you'd
  93. like to add.
  94. Remember, an XMPP username (also called a JID or Jabber ID) is similar to an
  95. email address, in that you have both the user's *handle* and the *domain name*
  96. of the provider, separated with an **@** sign.
  97. Once you've typed the username and clicked submit, your request will be sent to
  98. this person. If they are online, they will immediately be notified of your
  99. request, otherwise they'll see it next time they come online.
  100. Technically, when you add someone as a contact, you're doing two things. Firstly,
  101. you are adding the contact to your *roster* (think of it as an address book) and secondly
  102. you are asking to be notified whenever that person comes online.
  103. .. figure:: images/pending-contact.jpg
  104. :align: left
  105. :alt: A pending contact
  106. A pending contact
  107. A pending contact
  108. -----------------
  109. The person you are adding as a contact has the option to either accept or decline your request.
  110. Until that decision has been made, they will appear in your roster as a
  111. so-called *pending* contact. In other words, their final status is pending on whether
  112. they accept or decline your request.
  113. .. figure:: images/ungrouped-contact.png
  114. :align: right
  115. :alt: A normal, ungrouped contact
  116. A normal contact
  117. A normal contact
  118. ----------------
  119. If the person accepts your contact request, they will get a *chat status
  120. indicator* in your roster and will also become clickable. Clicking on the name
  121. of the user will open a chat box in which you can then start chatting with that
  122. user.
  123. .. figure:: images/remove-contact.png
  124. :align: left
  125. :alt: Removing a contact
  126. Removing a contact
  127. Removing a contact
  128. ==================
  129. To remove a contact, hover your mouse over their name and then click on the
  130. trash icon. You will be prompted to confirm, and if you do, the contact will no
  131. longer be visible in your roster.