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

Received messages in 1:1 chats are not logged in correct file #1214

Closed
janteau opened this issue Oct 27, 2019 · 7 comments
Closed

Received messages in 1:1 chats are not logged in correct file #1214

janteau opened this issue Oct 27, 2019 · 7 comments
Assignees
Milestone

Comments

@janteau
Copy link

janteau commented Oct 27, 2019

Expected Behavior

Messages received are logged when /chlog on and /omemo log on are enabled.

Current Behavior

Outgoing messages and message carbons sent by my JID are logged, but received messages from the other user are not logged.

This had been working, but seems not to be now. I have verified /chlog ON and /omemo log ON are set. I have tried quitting the application and restarting and the issue persists.

Steps to Reproduce (for bugs)

  1. Start profanity
  2. Verify /chlog ON and /omemo log ON
  3. Send 1:1 message and receive reply from other user
  4. Check log in ~/.local/share/profanity/chatlogs/JID/otherJID/date.log
  5. Messages sent by you (or your other client) are logged, but the received messages from the other participant are not.

Environment

Profanity, version 0.7.1dev.master.f186eb94
Copyright (C) 2012 - 2019 James Booth <boothj5web@gmail.com>.
Copyright (C) 2019 Michael Vetter <jubalh@iodoru.org>.
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: libmesode
Desktop notification support: Disabled
OTR support: Disabled
PGP support: Disabled
OMEMO support: Enabled
C plugins: Enabled
Python plugins: Enabled (2.7.15+)
GTK icons: Disabled
@jubalh jubalh self-assigned this Oct 28, 2019
@jubalh jubalh added the bug label Oct 28, 2019
@jubalh jubalh added this to the 0.8.0 milestone Oct 28, 2019
@jubalh
Copy link
Member

jubalh commented Oct 28, 2019

You are right, there is a mistake.
Stuff gets logged but not into one file. Seems we have user_at_domain.ltd where our outgoing messages are contianed and user_at_domain.ltd_resource where the incoming stuff is contained.

@jubalh jubalh changed the title Received messages in 1:1 chats are not logged Received messages in 1:1 chats are not logged in correct file Oct 28, 2019
@jubalh
Copy link
Member

jubalh commented Oct 28, 2019

@janteau are you sure outgoing MUC PM messages are logged for you? For me they are not o_O

jubalh added a commit that referenced this issue Oct 29, 2019
If I'm not mistaken MUC PMs have not been logged at all if there was no
other client sending carbons.
This should add MUC PM logging functionality.

We still need to make sure carbons log to the same file.

Regards #1214
jubalh added a commit that referenced this issue Oct 29, 2019
Add resourcepart to the outgoing carbon that is logged, so we use the
correct filenames for MUC PMs.

Dont log incoming carbons of MUC PMs as a workaround to faulty server
behaviour.

See https://wiki.xmpp.org/web/Multi-Session_Nicks#Private_Messages under
'Client-side workaround behavior'.

Regards #1214
@jubalh
Copy link
Member

jubalh commented Oct 29, 2019

@janteau can you test with latest master?

@jubalh
Copy link
Member

jubalh commented Oct 29, 2019

So MUC PMs seems where not logged at all.
Which is strange since I thought that works.. Confused about this one :0

And I added a workaround about carbons of MUC PMs.

See https://wiki.xmpp.org/web/Multi-Session_Nicks#Private_Messages under
'Client-side workaround behavior'.

Outgoing carbons are now logged, incoming carbons ignored.
Outgoing carbons have been fixed to use the proper filename like regular MUC PMs.

@janteau
Copy link
Author

janteau commented Oct 29, 2019

@jubalh I don't think I've ever sent a MUC PM, so that's why I never noticed it not working. It's just not something that comes up in my use case. I talk directly to my contacts and then talk in a few MUCs; I believe a MUC PM is a different circumstance correct?

I should have time this evening to try out the latest master. I'll see if I can do a MUC PM to test.

@jubalh
Copy link
Member

jubalh commented Oct 29, 2019

Oh then I understood this whole issue the wrong way and implemented a new feature :)

Yeah MUC PM is different. And now I implemented a workaround to treat them correctly haha.

Okay but regular 1:1 logging should work. Also carbons should work. And MUC logging should work. And MUC PM should work.

Just tested it and will close this issue now. Please comment still later if it works for you. Thanks!

@jubalh jubalh closed this as completed Oct 29, 2019
@janteau
Copy link
Author

janteau commented Oct 30, 2019

@jubalh I found my 1:1 received messages were getting logged into user_at_domain.ltd_resource.

The master I pulled down this evening (0.7.1dev.master.90042602) seems to be working. My 1:1 chats are now being logged into the user_at_domain.ltd file. Thanks!

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