Registering a nick in the MUC service or in a room is mutually exclusive:
- A nick that is registered in the service cannot be registered in any
room, not even the original owner can register it.
- Similarly, a nick registered in any room cannot be registered in the
service.
When changing the room subject, store the original author JID,
so later it can be provided in the hook and mod_room_occupantid
can use it to calculate and provide the occupant id
This is noticeable when a new occupant joins an existing room,
and receives the room subject.
Previously to check if hibernated room was old enough we had to fetch info
about all rooms from database. Now we repurpose created_at field in sql
to store that info, that allow us to have more efficient query just for it.
If we use _`whatever`_ here in ejabberd man pages,
it is converted to *`whatever`* in markdown,
and docs.ejabberd.im/Makefile converts to the proper links
Only non-persistent rooms that we are storing are those that were hibernated
but also have mucsub subscribers in them. I don't think it makes sense to
destroy those rooms on restart/reload if we didn't destroy them in first
place when last member did leave room, let just handle those rooms like
they are persistent, and kill them only when all user unsubscribe from them
or they are destroyed from api.
Several documentation callbacks (doc/0 and mod_doc/0) are implemented
and `ejabberdctl man` command is added to generate a man page. Note
that the command requires a2x to be installed (which is a part of
asciidoc package).
When module's options were updated (e.g. by reloading ejabberd.yml)
and, later, the module's process crashed, gen_mod supervisor
restarts the process with outdated options. This is now fixed.
The mapping between vCard's XML elements and YAML elements
of 'vcard' option is straightforward. For example, if you
want mod_muc to return the following vCard:
```
<vCard xmlns='vcard-temp'>
<FN>Conferences</FN>
<ADR>
<WORK/>
<STREET>Elm Street</STREET>
</ADR>
</vCard>
```
you need to set the configuration as:
```
modules:
...
mod_muc:
vcard:
fn: Conferences
adr:
-
work: true
street: Elm Street
...
```