class Puppet
Maps a Discord user to a Matrix ghost user.
The ghost's Matrix ID is derived from the username template in the bridge config (e.g., @discord_123456:example.com). This model tracks the Discord user's profile info for syncing to Matrix.
puppet = Puppet.create(discord_id: "123", username: "alice", name: "Alice") puppet.is_bot? # => false puppet.double_puppet? # => true (if custom_mxid is set)
Definitions
def double_puppet?
Is this puppet configured for double puppeting?
Implementation
def double_puppet?
!custom_mxid.nil? && !custom_mxid.empty?
end