Skip to content

Why scrolling back/up for old messages could fail #3677

Open
@hifi55

Description

@hifi55

Running Conversejs 10.1.8 on Prosody 0.12.3 on a Raspberry Pi B+.
Prosody 0.12.3 has mod_mam (message archive menagement) enabled by default.

Sometimes scrolling back/up for old messages stuck with spinning dots, and in no way it is possible to get them into view, neither in Windows using Firefox, Vivaldi or Edge, nor in Linux using Firefox an Vivalsi, nor on iPad.

Inspection of the archived message data in var/lib/prosody//archive/*.list file shows that a lot of consecutive error messages are present, forming a block of over 60 items.

Conversejs overrides the max_archive_query_results setting the Prosody MAM module (https://prosody.im/doc/modules/mod_mam) with its archived_messages_page_size variable. Both variables are set to 50 as default, which however is too small to reach for a non-error message in this case, thus causing the scroll back/up to fail.

All errors in this case belong to the xmpp-stanzas namespace. Blocking those errors to get stored into the message archive by including the setting
dont_archive_namespaces = {"urn:ietf:params:xml:ns:xmpp-stanzas"}
is a first attempt to prevent this from happening again. However at present, the only way to jump over the error messages is to increase archived_messages_page_size temporarily or prune the archived messages yourself by deleting the error items (all are xml text).

Solving this bug I suggest

  1. skip messages in the xmpp error namespace by default
    or
  2. keep track of the fetched empty error messages so that after scrolling on, eventually the real messages appear.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions