Code Monkey home page Code Monkey logo

Comments (2)

arcusfelis avatar arcusfelis commented on June 14, 2024

Not a bug, just a pretty inconsistent XMPP behaviour.
mod_blocking is based on mod_privacy, and mod_privacy needs some list to be activated on connect (but I think there is a default list too).

mod_mam has its own "privacy" settings. i.e. before they were in XEP-0313, now they got a separate XEP:
Oh, there is literally this XEP too https://xmpp.org/extensions/attic/xep-0441-0.2.0.html

Preferences ARE supported, you can do it.

<iq type='set' id='juliet3'>
  <prefs xmlns='urn:xmpp:mam:2' default='roster'>
    <always>
      <jid>[email protected]</jid>
    </always>
    <never>
      <jid>[email protected]</jid>
    </never>
  </prefs>
</iq>

I.e. you need to set list of jids to block once for mod_blocking and once for MAM preferences.

Theoretically we could just copy mod_mam_rdbms_prefs module to create mod_mam_blocking_prefs and hook it to use the list from mod_blocking. Except, it makes prefs read only (i.e. only updatable though mod_blocking API).

Except, it would not fully fix mod_inbox blocking.
Except, the behaviour for multichat rooms is undefined (i.e. you probably wanna put a spoiler on the client for that and adjust the push settings, but it would require work on the client side and someone actually describing what is a preferred behaviour).

Also, maybe we could still want to archive blocked threads (in case we want to unblock the user later), but don't show such threads. But in this case these messages should be filtered out from the list of messages we query when we don't provide with filter (maybe we should have a filter to filter out blocked messages, but good luck to make that efficient on the backend).

At least push service respects mod_blocking (I think).

TLDR: we could integrate MAM with mod_blocking, it would not fix mod_inbox. + the whole behaviour is still not consistent or desired. Once we figure out the consistent behaviour or better XMPP people would make a XEP describing a preferred solution - we could implement it.

from mongooseim.

DoxasticFox avatar DoxasticFox commented on June 14, 2024

Thanks for the quick reply! That clarifies things a whole lot. I'll close this issue for now.

from mongooseim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.