Skip to content

Conversation

@missytake
Copy link
Contributor

@missytake missytake commented Aug 15, 2025

Doesn't work yet:

Aug 15 16:17:24 bomba team-bot[4167858]: Exception cffi library 'deltachat.capi' has no function, constant or global variable named 'dc_send_reaction'
Aug 15 16:17:24 bomba team-bot[4167858]: Traceback:
Aug 15 16:17:24 bomba team-bot[4167858]: Traceback (most recent call last):
Aug 15 16:17:24 bomba team-bot[4167858]:   File "/home/tryteamsb_nine.testrun.org/.local/lib/team-bot.venv/lib/python3.11/site-packages/deltachat/events.py", line 289, in swallow_and_log_exception
Aug 15 16:17:24 bomba team-bot[4167858]:     yield
Aug 15 16:17:24 bomba team-bot[4167858]:   File "/home/tryteamsb_nine.testrun.org/.local/lib/team-bot.venv/lib/python3.11/site-packages/deltachat/events.py", line 284, in _process_event
Aug 15 16:17:24 bomba team-bot[4167858]:     hook(**kwargs)
Aug 15 16:17:24 bomba team-bot[4167858]:   File "/home/tryteamsb_nine.testrun.org/.local/lib/team-bot.venv/lib/python3.11/site-packages/pluggy/_hooks.py", line 501, in __call__
Aug 15 16:17:24 bomba team-bot[4167858]:     return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
Aug 15 16:17:24 bomba team-bot[4167858]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Aug 15 16:17:24 bomba team-bot[4167858]:   File "/home/tryteamsb_nine.testrun.org/.local/lib/team-bot.venv/lib/python3.11/site-packages/pluggy/_manager.py", line 119, in _hookexec
Aug 15 16:17:24 bomba team-bot[4167858]:     return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
Aug 15 16:17:24 bomba team-bot[4167858]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Aug 15 16:17:24 bomba team-bot[4167858]:   File "/home/tryteamsb_nine.testrun.org/.local/lib/team-bot.venv/lib/python3.11/site-packages/pluggy/_callers.py", line 138, in _multicall
Aug 15 16:17:24 bomba team-bot[4167858]:     raise exception.with_traceback(exception.__traceback__)
Aug 15 16:17:24 bomba team-bot[4167858]:   File "/home/tryteamsb_nine.testrun.org/.local/lib/team-bot.venv/lib/python3.11/site-packages/pluggy/_callers.py", line 102, in _multicall
Aug 15 16:17:24 bomba team-bot[4167858]:     res = hook_impl.function(*args)
Aug 15 16:17:24 bomba team-bot[4167858]:           ^^^^^^^^^^^^^^^^^^^^^^^^^
Aug 15 16:17:24 bomba team-bot[4167858]:   File "/home/tryteamsb_nine.testrun.org/.local/lib/team-bot.venv/lib/python3.11/site-packages/team_bot/bot.py", line 157, in ac_incoming_message
Aug 15 16:17:24 bomba team-bot[4167858]:     self.forward_to_outside(message)
Aug 15 16:17:24 bomba team-bot[4167858]:   File "/home/tryteamsb_nine.testrun.org/.local/lib/team-bot.venv/lib/python3.11/site-packages/team_bot/bot.py", line 211, in forward_to_outside
Aug 15 16:17:24 bomba team-bot[4167858]:     message.send_reaction("✉️")
Aug 15 16:17:24 bomba team-bot[4167858]:   File "/home/tryteamsb_nine.testrun.org/.local/lib/team-bot.venv/lib/python3.11/site-packages/deltachat/message.py", line 170, in send_reaction
Aug 15 16:17:24 bomba team-bot[4167858]:     msg_id = lib.dc_send_reaction(self.account._dc_context, self.id, as_dc_charpointer(reaction))
Aug 15 16:17:24 bomba team-bot[4167858]:              ^^^^^^^^^^^^^^^^^^^^
Aug 15 16:17:24 bomba team-bot[4167858]: AttributeError: cffi library 'deltachat.capi' has no function, constant or global variable named 'dc_send_reaction'
$ .local/lib/team-bot.venv/bin/pip list
Package            Version
------------------ ------------
bcrypt             4.1.2
certifi            2024.2.2
cffi               1.16.0
charset-normalizer 3.3.2
click              8.1.7
configparser       6.0.1
cryptography       42.0.5
deltachat          1.155.6
distro             1.9.0
gevent             24.2.1
greenlet           3.0.3
idna               3.6
imap-tools         1.5.0
Jinja2             3.1.3
MarkupSafe         2.1.5
paramiko           3.4.0
pickleDB           0.9
pip                25.2
pluggy             1.4.0
pycparser          2.22
pyinfra            2.9.2
PyNaCl             1.5.0
pypng              0.20220715.0
pyspnego           0.10.2
python-dateutil    2.9.0.post0
pywinrm            0.4.3
qrcode             7.4.2
requests           2.31.0
requests-ntlm      1.2.0
setuptools         66.1.1
six                1.16.0
team_bot           1.1.0
typing_extensions  4.10.0
urllib3            2.2.1
wheel              0.45.1
xmltodict          0.13.0
zope.event         5.0
zope.interface     6.2

fix #20

@missytake missytake changed the title WIP: feat: react to messages which are forwarded to the outside. fix #20 WIP: feat: react to messages which are forwarded to the outside Aug 15, 2025
@link2xt
Copy link
Contributor

link2xt commented Aug 16, 2025

CFFI for reactions actually does not exist, all platforms have migrated to using JSON-RPC for it.
As a result Python API does not work, we can as well remove it: chatmail/core#7117

@missytake
Copy link
Contributor Author

Ah well. Not gonna migrate to jsonRPC just for this.

@missytake missytake closed this Aug 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

In a relay group, the bot should react with an emoji to messages it forwarded to the outside

3 participants