Closed kssytsrk closed 3 years ago
Hi @kssytsrk, Thanks for the report. I believe we won't be able to fix any soon just because of lack of spare time of developers. But I think it has to be quite easy to extend the current OMEMO plugin with logging functionality. maybe even reuse some logging interfaces from other plugins from OMEMO plugin. You help would be highly appreciated.
CC @stigger
Thank you for the reply! I think I'm almost done with it, but I've noticed that the QDomElement &message
passed to the OMEMOPlugin::encryptMessageElement
function has the attribute of "from" (that is, message.attribute("from")
) set to an empty string.
Is this expected behavior? I've been trying to call my logger function from OMEMOPlugin::encryptMessageElement
before encrypting the message and I need the "from" attribute to extract the MUC's name (that is, where that message is going to be sent). There might be some other way, but that is how it was implemented in the Conference Logger plugin...
Basically when you join a muc, the server associates your full account jid (account@server/resource) with your muc jid (room@muc.server/nickname) and for consequent outgoing messages the "from" attribute in not needed because the server knows everything coming from account@server/resource to the muc room@muc.server is in fact coming from room@muc.server/nickname.
So to have your muc jid you can go next ways:
to summarize for messages we have... client -> server
server -> client
@kssytsrk: Thanks a lot for your contributions! :)
Can you look other OMEMO problems?
For example, I have tagged you in some OMEMO tickets, can you look?
The Conference Logger plugin does not seem to work with an OMEMO-encrypted MUC/groupchat. It does log messages, but is unable to decrypt them (they decrypted fine when I received them):
AFAIK Profanity and Gaijim don't support logs of OMEMO-encrypted MUCs either (or at least not out-of-the-box), but the Conversations client for Android does. Are there perhaps any workarounds for this problem (aside from copy+paste by hand)? If not, in theory, could an "OMEMO conference logger" plugin be written? I might try to implement that, but would appreciate it if someone who is familiar with Psi's codebase/api provided some pointers.