Mercurial > prosody-hg
comparison plugins/muc/mod_muc.lua @ 13905:0e346f4d88ce
MUC: Add get_occupant_id_from_jid() method, which works on real JIDs
This is useful to get the occupant ID of someone who is affiliated, but not
currently joined to the room.
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Fri, 20 Jun 2025 18:55:39 +0100 |
| parents | c6010e1322aa |
| children | 356c8ec22e9a |
comparison
equal
deleted
inserted
replaced
| 13904:f8779be95156 | 13905:0e346f4d88ce |
|---|---|
| 98 room_mt.get_valid_broadcast_roles = presence_broadcast.get_valid_broadcast_roles; -- FIXME doesn't exist in the library | 98 room_mt.get_valid_broadcast_roles = presence_broadcast.get_valid_broadcast_roles; -- FIXME doesn't exist in the library |
| 99 | 99 |
| 100 local occupant_id = module:require "muc/occupant_id"; | 100 local occupant_id = module:require "muc/occupant_id"; |
| 101 room_mt.get_salt = occupant_id.get_room_salt; | 101 room_mt.get_salt = occupant_id.get_room_salt; |
| 102 room_mt.get_occupant_id = occupant_id.get_occupant_id; | 102 room_mt.get_occupant_id = occupant_id.get_occupant_id; |
| 103 room_mt.get_occupant_id_from_jid = occupant_id.get_occupant_id_from_jid; | |
| 103 | 104 |
| 104 local jid_split = require "prosody.util.jid".split; | 105 local jid_split = require "prosody.util.jid".split; |
| 105 local jid_prep = require "prosody.util.jid".prep; | 106 local jid_prep = require "prosody.util.jid".prep; |
| 106 local jid_bare = require "prosody.util.jid".bare; | 107 local jid_bare = require "prosody.util.jid".bare; |
| 107 local jid_resource = require "prosody.util.jid".resource; | 108 local jid_resource = require "prosody.util.jid".resource; |
