Commit graph

5 commits

Author SHA1 Message Date
eta 83d172f899 Upload and send images natively (!); don't block on QR code
- This commit contains initial support for uploading and sending images natively
  -- i.e. a WhatsApp image upload, instead of sending through a bare link.
- All images supported by the OPTICL library are supported; this is because WA
  needs us to generate a jpeg thumbnail for the image (which can probably be
  made smaller)
- Importantly, this functionality is currently a trivial DoS vector: simply send
  a large file (or an infinite file, like time.gif) and it ALL gets downloaded
  and buffered into RAM...!
  - At least this is limited to users who have actually registered with the
    bridge.
- Failing to send the image in any way results in an XMPP error getting reported
  back to the sender.
- Also, the initial registration QR code upload thing now happens in another
  thread.
2020-09-01 20:01:02 +01:00
eta 7506da1469 Fix the Nix build (!!) 2020-08-21 18:15:52 +01:00
eta 599123dbef Generate entity caps & process disconnect messages
- The bridge should now support XEP-0115 Entity Capabilities, which actually
  brings us into compliance with XEP-0085 Chat State Notifications (there were
  clients, like Miranda NG, that wouldn't send to us without us actually doing
  this XEP and advertising support in disco#info).
- We now handle the :disconnect message from whatscl, which lets us properly
  deal with the connection being removed from the app or replaced with another
  session. (Before, this would drop the connection, it'd loop and retry, and
  then hit a status code error on login; this way is slightly cleaner and also
  prevents the bridge getting into a war with another bridge.)
- The :ws-open whatscl event never existed. The bridge was doing just fine
  not executing its handler, so it's just been removed. Future work might
  improve the amount of spam sent to the user about the bridge state.
2020-08-01 16:58:50 +01:00
eta ae303489ad bump wsd version 2020-07-13 22:33:57 +01:00
eta 7e457266f8 nix: add Nix derivation for whatsxmpp (yay!)
- Using tazjin's buildLisp.nix (you need the TVL Monorepo installed
  as <depot>), we have a derivation for whatsxmpp and its million
  dependencies.
- The derivation currently just assumes whatscl is in ../whatscl,
  but we'll fix that eventually.
- Also there are tons of buildLisp derivations in here, and even
  two instances where we had to vendor stuff in order to get it to
  work with nix (usually because it had some data file).
- But yay, we can build via docker and it's not utter trash!
2020-07-06 22:44:28 +01:00