~deuill

London, UK

https://deuill.org

Fitter, happier, more productive


#28 History sync 4 months ago

Comment by ~deuill on ~nicoco/slidge-whatsapp

Mostly just needs testing, currently it's set up for MUC sync only (and only for initial sync, not for on-demand/MAM sync). MAM would require storing the last sent/received message metadata in on-disk storage, as WhatsApp requires message ID, sender, and carbon status for on-demand sync.

#28 History sync 4 months ago

~nicoco assigned ~deuill to #28 on ~nicoco/slidge-whatsapp

#15 Python packages produced by CI are not installable with pipx 7 months ago

on ~nicoco/slidge-whatsapp

Oh good, it works! CI is not triggered by pushes from ~deuill because of a sourcehut issue unfortunately. We'll get this fixed...

#18 Handle Opus-encoded Ogg files as voice messages 7 months ago

Ticket created by ~deuill on ~nicoco/slidge-whatsapp

Currently, files uploaded as audio/ogg will only be handled as audio uploads, even if they're correctly encoded with Opus as expected by WhatsApp.

Since Opus-encoded Ogg files seem to be quite exclusively used for speech, we should attempt to check for the codec used in audio/ogg files and set the correct MIME type here (audio/ogg; codecs=opus) if an Opus stream is found.

#17 Investigate issues with contact back-filling 7 months ago

Comment by ~deuill on ~nicoco/slidge-whatsapp

Fixes pushed

REPORTED RESOLVED CLOSED

#17 Investigate issues with contact back-filling 7 months ago

Comment by ~deuill on ~nicoco/slidge-whatsapp

Seems to be a consequence of https://github.com/go-python/gopy/pull/338, we need to update for ptr in ... calls here to rely on concrete instances rather than "pointer" references.

#17 Investigate issues with contact back-filling 7 months ago

Ticket created by ~deuill on ~nicoco/slidge-whatsapp

On production, contact back-fills are failing with the following error:

ERROR:slidge.core.gateway.base:Crash in task
Traceback (most recent call last):
  File "/venv/whatsapp/lib/python3.11/site-packages/slidge/core/gateway/base.py", line 417, in __login_wrap
    await session.contacts.fill()
  File "/venv/whatsapp/lib/python3.11/site-packages/legacy_module/contact.py", line 42, in fill
    await self.add_whatsapp_contact(whatsapp.Contact(handle=ptr))
                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/venv/whatsapp/lib/python3.11/site-packages/legacy_module/generated/whatsapp.py", line 1381, in __init__
    _whatsapp.IncRef(self.handle)
TypeError: 'Contact' object cannot be interpreted as an integer
Exception ignored in: <function Contact.__del__ at 0x7f2297413b00>
Traceback (most recent call last):
  File "/venv/whatsapp/lib/python3.11/site-packages/legacy_module/generated/whatsapp.py", line 1397, in __del__
    _whatsapp.DecRef(self.handle)
TypeError: 'Contact' object cannot be interpreted as an integer
INFO:slixmpp.xmlstream.xmlstream:connection_lost: (None,)
INFO:root:Successful clean shut down

It's uncertain what the actual issue is here.

#16 Investigate rare issues with sending files 8 months ago

Ticket created by ~deuill on ~nicoco/slidge-whatsapp

Saw this traceback in logs, and probably should investigate:

INFO:slixmpp.plugins.xep_0363.http_upload:Response code: 201 ()
Traceback (most recent call last):
  File "/venv/whatsapp/lib/python3.11/site-packages/legacy_module/session.py", line 513, in wrapper
Traceback (most recent call last):
  File "/venv/whatsapp/lib/python3.11/site-packages/legacy_module/session.py", line 513, in wrapper
    return future.result()
           ^^^^^^^^^^^^^^^
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/concurrent/futures/_base.py", line 456, in result
  File "/usr/lib/python3.11/concurrent/futures/_base.py", line 456, in result
    return self.__get_result()
    return self.__get_result()
           ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/concurrent/futures/_base.py", line 401, in __get_result
           ^^^^^^^^^^^^^^^^^^^
    raise self._exception
  File "/venv/whatsapp/lib/python3.11/site-packages/legacy_module/session.py", line 47, in wrapped
  File "/usr/lib/python3.11/concurrent/futures/_base.py", line 401, in __get_result
    return await func(self, *a, **k)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/venv/whatsapp/lib/python3.11/site-packages/legacy_module/session.py", line 141, in handle_event
    raise self._exception
  File "/venv/whatsapp/lib/python3.11/site-packages/legacy_module/session.py", line 47, in wrapped
    await self.handle_message(data.Message)
  File "/venv/whatsapp/lib/python3.11/site-packages/legacy_module/session.py", line 264, in handle_message
    return await func(self, *a, **k)
    await contact.send_files(
  File "/venv/whatsapp/lib/python3.11/site-packages/slidge/core/mixins/attachment.py", line 405, in send_files
           ^^^^^^^^^^^^^^^^^^^^^^^^^
    _url, msgs = await self.send_file(
    ^^^^^^^^^^
TypeError: cannot unpack non-iterable NoneType object
  File "/venv/whatsapp/lib/python3.11/site-packages/legacy_module/session.py", line 141, in handle_event
    await self.handle_message(data.Message)
  File "/venv/whatsapp/lib/python3.11/site-packages/legacy_module/session.py", line 264, in handle_message
    await contact.send_files(
  File "/venv/whatsapp/lib/python3.11/site-packages/slidge/core/mixins/attachment.py", line 405, in send_files
    _url, msgs = await self.send_file(
    ^^^^^^^^^^
TypeError: cannot unpack non-iterable NoneType object

#8 No presence/last seen when receiving message from new contact 8 months ago

on ~nicoco/slidge-whatsapp

I just tried sending a msg to a non-contact, and got name, avatar and presence as soon as they replied, so I think this is fixed by something you did ~deuill.

#7 Last seen stops updating after a while 8 months ago

Comment by ~deuill on ~nicoco/slidge-whatsapp

Same here, yeah. I think maybe I can reduce the interval between background sync jobs, but otherwise the recent-ish fixes seem to have worked. Cheers!