File: prosody-upload.cfg.lua

package info (click to toggle)
slidge-matridge 0.3.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 948 kB
  • sloc: python: 2,035; xml: 127; makefile: 16
file content (38 lines) | stat: -rw-r--r-- 1,191 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
modules_enabled = {
  -- [...]
  "http_file_share"; -- for attachments with the "upload" option
  "privilege"; -- for roster sync and 'legacy carbons'
}

local _privileges = {
    roster = "both";
    message = "outgoing";
    iq = {
      ["http://jabber.org/protocol/pubsub"] = "both";
      ["http://jabber.org/protocol/pubsub#owner"] = "set";
      ["urn:xmpp:http:upload:0"] = "get";
    };
}

VirtualHost "example.org"
  -- for roster sync and 'legacy carbons'
  privileged_entities = {
    ["matrix.example.org"] =_privileges,
    ["other-walled-garden.example.org"] = _privileges,
    -- repeat for other slidge plugins…
  }

Component "matrix.example.org"
  component_secret = "secret"
  modules_enabled = {"privilege"}

Component "other-walled-garden.example.org"
  component_secret = "some-other-secret"
  modules_enabled = {"privilege"}

-- for attachments with the "upload" option
-- in matrix's config: upload-service=upload.example.org
Component "upload.example.org" "http_file_share"
    server_user_role = "prosody:registered"
    -- alternatively, you can be more specific with:
    -- http_file_share_access = { "matrix.example.org", "other-walled-garden.example.org" }