view mod_minimix/README.markdown @ 4651:8231774f5bfd

mod_cloud_notify_encrypted: Ensure body substring remains valid UTF-8 The `body:sub()` call risks splitting the string in the middle of a multi-byte UTF-8 sequence. This should have been caught by util.stanza validation, but that would have caused some havoc, at the very least causing the notification to not be sent. There have been no reports of this happening. Likely because this module isn't widely deployed among users with languages that use many longer UTF-8 sequences. The util.encodings.utf8.valid() function is O(n) where only the last sequence really needs to be checked, but it's in C and expected to be fast.
author Kim Alvefur <zash@zash.se>
date Sun, 22 Aug 2021 13:22:59 +0200
parents 140cda94c342
children
line wrap: on
line source

# Account based MUC joining

Normally when joining a MUC groupchat, it is each individual client that
joins. This means their presence in the group is tied to the session,
which can be short-lived or unstable, especially in the case of mobile
clients.

This has a few problems. For one, for every message to the groupchat, a
copy is sent to each joined client. This means that at the account
level, each message would pass by once for each client that is joined,
making it difficult to archive these messages in the users personal
archive.

A potentially better approach would be that the user account itself is
the entity that joins the groupchat. Since the account is an entity that
lives in the server itself, and the server tends to be online on a good
connection most of the time, this may improve the experience and
simplify some problems.

This is one of the essential changes in the MIX architecture, which is
being designed to replace MUC.

`mod_minimix` is an experiment meant to determine if things can be
improved without replacing the entire MUC standard. It works by
pretending to each client that nothing is different and that they are
joining MUCs directly, but behind the scenes, it arranges it such that
only the account itself joins each groupchat. Which sessions have joined
which groups are kept track of. Groupchat messages are then forked to
those sessions, similar to how normal chat messages work.

## Known issues

-   You can never leave.
-   You will never see anyone leave.
-   Being kicked is not handled.

## Unknown issues

-   Probably many.

## TODO

-   Integrate with bookmarks
-   tracking outgoing presence
-   leaving rooms
-   nickname management
-   bookmark sync

# Compatibility

Briefly tested with Prosody trunk (as of this writing).