Software /
code /
prosody
Comparison
plugins/mod_roster.lua @ 13798:35819bc9471a 13.0
mod_roster: Fix shell commands when a component is involved (fixes #1908)
Prevent attempt to load rosters on Components since they do not have
users or rosters.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 31 Mar 2025 21:19:14 +0200 |
parent | 13584:0f265142117a |
comparison
equal
deleted
inserted
replaced
13796:c8e534b4f2e2 | 13798:35819bc9471a |
---|---|
160 -- Update user's roster to say subscription request is pending. Bare hosts (e.g. components) don't have rosters. | 160 -- Update user's roster to say subscription request is pending. Bare hosts (e.g. components) don't have rosters. |
161 if user_username ~= nil then | 161 if user_username ~= nil then |
162 rostermanager.set_contact_pending_out(user_username, user_host, contact_jid); | 162 rostermanager.set_contact_pending_out(user_username, user_host, contact_jid); |
163 end | 163 end |
164 | 164 |
165 if prosody.hosts[contact_host] then -- Sending to a local host? | 165 if prosody.hosts[contact_host] and prosody.hosts[contact_host].type == "local" then -- Sending to a local host? |
166 -- Update contact's roster to say subscription request is pending... | 166 -- Update contact's roster to say subscription request is pending... |
167 rostermanager.set_contact_pending_in(contact_username, contact_host, user_jid); | 167 rostermanager.set_contact_pending_in(contact_username, contact_host, user_jid); |
168 -- Update contact's roster to say subscription request approved... | 168 -- Update contact's roster to say subscription request approved... |
169 rostermanager.subscribed(contact_username, contact_host, user_jid); | 169 rostermanager.subscribed(contact_username, contact_host, user_jid); |
170 -- Update user's roster to say subscription request approved. Bare hosts (e.g. components) don't have rosters. | 170 -- Update user's roster to say subscription request approved. Bare hosts (e.g. components) don't have rosters. |