Privileges

Note

XEP-0356: Privileged Entity” only works for XMPP users using the same server as sleamdge, e.g., eve@example.org on steam.example.org.

Setting up sleamdge as a privileged entity (XEP-0356) is optional, but nice to have. It improves user experience with a few “cherry on top” features. By configuring your XMPP server such that sleamdge is a privileged entity, sleamdge can:

  • automatically add/remove “puppet contacts” from the XMPP roster of sleamdge users,

  • reflect on the XMPP side messages sent by users via official Steam apps,

  • (if using HTTP Upload for attachments from Steam to XMPP) request upload slots on behalf of sleamdge users, respecting any quota, retention, permission, or other policy set at the upload component level,

  • synchronize other actions done via official Steam apps, such as marking messages as read, using emoji reactions, retracting messages, sending files…

  • automatically add XMPP bookmarks (XEP-0402) for MUCs (XEP-0045).

Server-specific instructions

Prosŏdy

Install the mod_privilege community module with:

prosodyctl install --server=https://modules.prosody.im/rocks/ mod_privilege

In prosody.cfg.lua, add mod_privilege to the modules_enabled list, and declare sleamdge privileges in the appropriate virtualhost block:

local _privileges = {
  roster = "both";       -- for adding/removing contacts from the users' rosters
  message = "outgoing";  -- for reflecting messages sent by the user themselve from official Steam apps
  iq = {
    ["http://jabber.org/protocol/pubsub"] = "both";      -- for PEP Bookmarks
    ["http://jabber.org/protocol/pubsub#owner"] = "set"; -- for Message Display Synchronization
    ["urn:xmpp:http:upload:0"] = "get";                  -- for HTTP Upload on behalf of users
  }
};

VirtualHost "example.org"
  privileged_entities = {
    ["steam.example.org"] = _privileges;
  }

Then either restart the prosody server, or reload the config. You might need to use mod_reload_component, and activate/deactivate hosts for all changes to be taken into account (restarting prosody is the easiest way to go).

ejabberd

acl:
  slidge_acl:
    server:
      - "steam.example.org"

access_rules:
  slidge_rule:
    - allow: slidge_acl

modules:
  mod_privilege:
    roster:
      both: slidge_rule
    message:
      outgoing: slidge_rule
    iq:
      "http://jabber.org/protocol/pubsub":
        both: slidge_rule
      "http://jabber.org/protocol/pubsub#owner":
        set: slidge_rule
      "urn:xmpp:http:upload:0":
        get: slidge_rule
  mod_roster:
    versioning: true

Next step

Learn about about sleamdge’s configuration to tune its behaviour to your liking.