Commit Graph

10 Commits

Author SHA1 Message Date
eta d664cb800c Introduce user & global archiving controls; add unregister function
- WARNING to operators: You MUST run fixup_2.sql in order to use this and newer
  versions of the bridge.
- Archiving and full chat history fetches are now a configuration setting (and
  default to off).
- Users now have to enable archiving manually by talking to the admin user, and
  are warned about the potential privacy implications.
- Users can now completely remove themselves from the bridge, deleting all data.
- Bridge administrators can now be specified by adding an entry to the
  'administrators' SQL table with your JID. These can force-unregister specific
  users.
2020-09-30 14:01:52 +01:00
eta c36d61687a Message Archive Management (MAM) support for groupchats
- Groupchats now support XEP-0313 Message Archive Management (MAM)!
- This uses the history stored in the sqlite database, as implemented in the
  previous commits.
  - The QUERY-ARCHIVE megafunction builds up a SQL query to get stuff out of the
    database, in accordance with provided MAM + RSM parameters.
- Notably, various hacks are in here that need to be fixed.
  - IQ 'set's are now processed, which means we needed to add a stub impl of
    Schrödinger's Chat so people don't drop out of MUCs all of a sudden.
    (Well, it just responds to every ping indiscriminately...)
  - Oh also the new presence subscription stuff from earlier is borked.
2020-09-27 23:01:40 +01:00
eta f979abbd35 Save groupchat messages in an archive, allow bulk history requesting
- WARNING: This change is hilariously unsuitable for public instances. Don't run
  this code in such an environment yet!
- Groupchat messages are now stored in the sqlite3 database, with the intent
  to allow retrieval via MAM at a later date.
  FIXME: You can't opt out of this though, which is a huge GDPR hole.
- You can also request ALL of your group chat history from whatsapp be fetched
  and stored in the database (!!). This is a VERY resource-intensive operation,
  as it involves spawning a metric crapton of threads, uploading a metric
  crapton of historical media to the configured upload server, and writing a
  metric crapton of messages into the database.
  - At some point, the ability to invoke this will be severely limited to only
    approved users. That point has not yet come, though.
  - Additionally, the chat history request will abort if the connection it's
    associated with dies. (You can just retry it, though.)
2020-09-26 19:49:26 +01:00
eta 39001728b3 slightly hacky but functional groupchat / MUC support 2020-04-12 08:27:04 +01:00
eta 9d02fb6050 Handle picture & status changes, bridge status as well as picture 2020-04-07 13:06:26 +01:00
eta 47024701a5 Handle avatars (!) and various types of presence requests 2020-04-05 15:05:27 +01:00
eta 29eecd2b03 Bridge read and delivery receipts as well, yay 2020-04-05 12:04:19 +01:00
eta 12cb121100 Handle presence subscriptions, vcard-temp, and other stuff 2020-04-04 23:12:39 +01:00
eta 5c9a257f5c It actually connects to WhatsApp! Who'd have thought it? 2020-04-04 15:24:51 +01:00
eta 2d873df755 IQ handlers, XEP-0363 stuff, and SQLite, oh my! 2020-04-03 17:40:05 +01:00