No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. # Server Notices
  2. 'Server Notices' are a new feature introduced in Synapse 0.30. They provide a
  3. channel whereby server administrators can send messages to users on the server.
  4. They are used as part of communication of the server polices (see
  5. [Consent Tracking](consent_tracking.md)), however the intention is that
  6. they may also find a use for features such as "Message of the day".
  7. This is a feature specific to Synapse, but it uses standard Matrix
  8. communication mechanisms, so should work with any Matrix client.
  9. ## User experience
  10. When the user is first sent a server notice, they will get an invitation to a
  11. room (typically called 'Server Notices', though this is configurable in
  12. `homeserver.yaml`). They will be **unable to reject** this invitation -
  13. attempts to do so will receive an error.
  14. Once they accept the invitation, they will see the notice message in the room
  15. history; it will appear to have come from the 'server notices user' (see
  16. below).
  17. The user is prevented from sending any messages in this room by the power
  18. levels.
  19. Having joined the room, the user can leave the room if they want. Subsequent
  20. server notices will then cause a new room to be created.
  21. ## Synapse configuration
  22. Server notices come from a specific user id on the server. Server
  23. administrators are free to choose the user id - something like `server` is
  24. suggested, meaning the notices will come from
  25. `@server:<your_server_name>`. Once the Server Notices user is configured, that
  26. user id becomes a special, privileged user, so administrators should ensure
  27. that **it is not already allocated**.
  28. In order to support server notices, it is necessary to add some configuration
  29. to the `homeserver.yaml` file. In particular, you should add a `server_notices`
  30. section, which should look like this:
  31. ```yaml
  32. server_notices:
  33. system_mxid_localpart: server
  34. system_mxid_display_name: "Server Notices"
  35. system_mxid_avatar_url: "mxc://example.com/oumMVlgDnLYFaPVkExemNVVZ"
  36. room_name: "Server Notices"
  37. room_avatar_url: "mxc://example.com/oumMVlgDnLYFaPVkExemNVVZ"
  38. room_topic: "Room used by your server admin to notice you of important information"
  39. auto_join: true
  40. ```
  41. The only compulsory setting is `system_mxid_localpart`, which defines the user
  42. id of the Server Notices user, as above. `room_name` defines the name of the
  43. room which will be created, `room_avatar_url` its avatar and `room_topic` its topic.
  44. `system_mxid_display_name` and `system_mxid_avatar_url` can be used to set the
  45. displayname and avatar of the Server Notices user.
  46. `auto_join` will autojoin users to the notices room instead of sending an invite.
  47. ## Sending notices
  48. To send server notices to users you can use the
  49. [admin_api](admin_api/server_notices.md).