README 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  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. Settings
  47. ========
  48. Required
  49. --------
  50. user User part of the jid (like 'update')
  51. server Host part of the jid (like 'site.example')
  52. password The account's password. (your secret string)
  53. Optional
  54. --------
  55. resource JID resource. Default: 'gnusocial'
  56. encryption TLS server? Default: true
  57. host Hostname for XMPP server? Default: same as server
  58. port XMPP server port. Default: 5222
  59. debug Log extra debug info. Default: false
  60. public JIDs that should get the public feed (see "Public feed").
  61. Since we do not currently support DNS SRV record lookup, please note
  62. that you may have to enter an alternative 'host' parameter. This is
  63. the case when update@site.example is not handled by the direct _address_
  64. "site.example" but rather something like "xmpp.site.example".
  65. Public feed
  66. ===========
  67. You can send *all* messages from your social networking site to a
  68. third-party service using XMPP. This can be useful for providing
  69. search, indexing, bridging, or other cool services. Maybe a text
  70. display next to your coffee machine at work.
  71. To configure a downstream site to receive your public stream, add
  72. their "JID" (Jabber ID) in the "public" array in your addPlugin call.
  73. For example
  74. addPlugin(array(
  75. [...]
  76. 'public' => array('awesomebot@site.example'),
  77. As the Pre-requisites section says, please only try to configure this
  78. with daemons running properly in the background.