Chapter 4. Configuration

Table of Contents

Using separate storage
Configuring default room configuration
Enabling and configuring MUC room logging
Disable message filtering
Disable presence filtering
Configuring discovering of disconnected participants
Allow chat states in rooms
Disable locking of new rooms
Disable joining with multiple resources under same nickname
Enabling support for XEP-0091: Legacy Delayed Delivery

To enable Tigase MUC Component you need to add following block to etc/init.properties file:

muc () {
}

It will enable component and configure it under name muc. By default it will also use database configured as default data source to store data - including room configuration, affiliations and chat history.

Using separate storage

As mentioned above, by default Tigase MUC component uses default data source configured for Tigase XMPP Server. It is possible to use separate store by MUC component. To do so you need to configure new DataSource in dataSource section. Here we will use muc-store as name of newly configured data source. Additionally you need to pass name of newly configured data source to dataSourceName property of default DAO of MUC component.

dataSource {
    muc-store () {
        uri = 'jdbc:postgresql://server/muc-database'
    }
}

muc () {
    muc-dao {
        default () {
            dataSourceName = 'muc-store'
        }
    }
}

It is also possible to configure separate store for particular domain, ie. muc.example.com. Here we will configure data source with name muc.example.com and use it to store data for MUC rooms hosted at muc.example.com:

dataSource {
    'muc.example.com' () {
        uri = 'jdbc:postgresql://server/example-database'
    }
}

muc () {
    muc-dao {
        'muc.example.com' () {
          # we may not set dataSourceName as it matches name of domain
        }
    }
}

Note

With this configuration room data for other domains than example.com will be stored in default data source.