module

XMPP::ComponentPrivilege

XEP-0356: Privileged Entity - Component Side Implementation Allows components to have privileged access to user data

Instance methods

get_user_roster(user_jid : String) : String | Nil

Get a user's roster (requires roster get permission) Returns the IQ ID for tracking the response

Source
grant_privilege(access : String, type : String, push : Bool = false, namespaces : Array(String) = [] of String)

Manually add a privilege (for testing or explicit configuration)

Source
handle_privilege_advertisement(privilege_msg : Stanza::Message)

Handle privilege advertisement from server Called when server sends <message> with <privilege> element

Source
handle_roster_push(iq : Stanza::IQ)

Handle roster pushes (if permission granted)

Source
privilege_manager
Source
send_privileged_message(from_jid : String, to_jid : String, body : String)

Send a message on behalf of a user (requires message outgoing permission)

Source
set_roster_item(user_jid : String, item_jid : String, name : String = "", groups : Array(String) = [] of String) : String | Nil

Set a roster item (requires roster set permission) Returns the IQ ID for tracking the response

Source
setup_privilege_handlers

Setup privilege handlers

Source

Nested types