Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prof_pre_chat_message_display plugin hook for chat history messages has empty resource #2012

Open
ventosus opened this issue Jan 17, 2025 · 0 comments

Comments

@ventosus
Copy link

The prof_pre_chat_message_display hook on the plugin side for chat history messages has en empty (NULL) resource. There's no way to figure out to which peer chat the memessages belong to, as the prof_on_chat_win_focus hook is only fired after the history messages have already arrived.

debug

In the plugin hooks I just put this:

char msg [128];
snprintf(msg, sizeof(msg), "[%s] %s %s %s", __func__, barejid, resource, message);
prof_cons_show(msg);

log

14:42:33 ! [prof_pre_chat_message_display] peer@domain1 (null) ping
14:42:33 ! [prof_pre_chat_message_display] me@domain2 (null) pong
14:42:33 ! [prof_on_chat_win_focus] peer@domain1

version

$ profanity --version 2>&1 | sed -e 's/^/    /g'
Profanity, version 0.14.0
Copyright (C) 2012 - 2019 James Booth <[email protected]>.
Copyright (C) 2019 - 2023 Michael Vetter <[email protected]>.
License GPLv3+: GNU GPL version 3 or later <https://www.gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Build information:
XMPP library: libstrophe
Desktop notification support: Enabled
OTR support: Enabled (libotr 4.1.1)
PGP support: Enabled (libgpgme 1.24.1)
OMEMO support: Enabled
C plugins: Enabled
Python plugins: Enabled (3.13.1)
GTK icons/clipboard: Disabled
GDK Pixbuf: Enabled
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants