README 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. XMPP (eXtended Message and Presence Protocol, <http://xmpp.org/>) is the
  2. federating instant-messaging protocol of the future. It is wildly used
  3. all over the world by organisations, private individuals and everyone.
  4. GNU social allows you to receive and distribute messages via XMPP using
  5. this plugin. To get it running, you must also use an active XMPP account.
  6. Installation
  7. ============
  8. Add an addPlugin call to your config.php with your settings. Please read
  9. the "Pre-requisites" section of what is required for this to work.
  10. Example
  11. -------
  12. The example account "update@site.example" is hosted on a machine which
  13. can be reached at the hostname "xmpp.site.example".
  14. addPlugin('Xmpp', array(
  15. 'user' => 'update',
  16. 'server' => 'site.example',
  17. 'host' => 'xmpp.site.example',
  18. 'password' => '...',
  19. ));
  20. Pre-requisites
  21. ==============
  22. 0. You may want to strongly consider setting up your own XMPP server.
  23. We highly recommend the XMPP server "Prosody" <https://prosody.im/>
  24. because it is actively developed and highly secure and efficient. It
  25. is of course also free software under the MIT license. The following
  26. three pages will help you get it running, even self-hosted at home:
  27. 0.1 https://prosody.im/doc/dns
  28. 0.2 https://prosody.im/doc/install
  29. 0.3 https://prosody.im/doc/configure
  30. 1. You must register an XMPP user ID (JID) which is used to send and
  31. receive messages. Call it something like "update@site.example" or
  32. similar to hint at what the account is made for. You may register
  33. the account on any public server (jabber.org, jit.si, etc...) if
  34. you cannot run one yourself.
  35. GNU social will not register anything for you, this must be done
  36. manually, preferrably using an XMPP client like Swift, Empathy,
  37. Jitsi or maybe even the commandline on your own server. With
  38. prosody, that'd be (perhaps prepended with 'sudo'):
  39. prosodyctl adduser update@site.example
  40. 2. Configure your site's XMPP variables, as described below in the
  41. Settings section below.
  42. 3. Learn to use the GNU social daemons for processing notice queues,
  43. background checks and other processes which would be too slow to
  44. perform on an active site. Using XMPP requires the "imdaemon" to
  45. run, since a long-running XMPP connection is somewhat necessary.
  46. A design goal of GNU Social is that the basic Web functionality should
  47. work on even the most restrictive commercial hosting services.
  48. However, additional functionality, such as receiving messages by XMPP,
  49. require that you be able to run long-running processes on your account.
  50. Settings
  51. ========
  52. Required
  53. --------
  54. user User part of the jid (like 'update')
  55. server Host part of the jid (like 'site.example')
  56. password The account's password. (your secret string)
  57. Optional
  58. --------
  59. resource JID resource. Default: 'gnusocial'
  60. encryption TLS server? Default: true
  61. host Hostname for XMPP server? Default: same as server
  62. port XMPP server port. Default: 5222
  63. debug Log extra debug info. Default: false
  64. public JIDs that should get the public feed (see "Public feed").
  65. Since we do not currently support DNS SRV record lookup, please note
  66. that you may have to enter an alternative 'host' parameter. This is
  67. the case when update@site.example is not handled by the direct _address_
  68. "site.example" but rather something like "xmpp.site.example".
  69. Public feed
  70. ===========
  71. You can send *all* messages from your social networking site to a
  72. third-party service using XMPP. This can be useful for providing
  73. search, indexing, bridging, or other cool services. Maybe a text
  74. display next to your coffee machine at work.
  75. To configure a downstream site to receive your public stream, add
  76. their "JID" (Jabber ID) in the "public" array in your addPlugin call.
  77. For example
  78. addPlugin(array(
  79. [...]
  80. 'public' => array('awesomebot@site.example'),
  81. As the Pre-requisites section says, please only try to configure this
  82. with daemons running properly in the background.