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

Improve MUC 1:1 logging #1184

Closed
jubalh opened this issue Sep 4, 2019 · 4 comments
Closed

Improve MUC 1:1 logging #1184

jubalh opened this issue Sep 4, 2019 · 4 comments
Assignees
Milestone

Comments

@jubalh
Copy link
Member

jubalh commented Sep 4, 2019

Expected Behavior

/grlog on should enable MUC logging.

Current Behavior

No new files in ~/.local/share/profanity/chatlogs/account-name/channel-name.

Possible Solution

On a test machine the last log was from August 2019. Let's check the commits since then.

Context

Encountered when testing #1181

@jubalh jubalh added the bug label Sep 4, 2019
@jubalh jubalh added this to the 0.8.0 milestone Sep 4, 2019
@jubalh jubalh self-assigned this Sep 4, 2019
@jubalh
Copy link
Member Author

jubalh commented Sep 4, 2019

I was wrong :-)
Location is not ~/.local/share/profanity/chatlogs/account-name/channel-name/2019_08_02.log but it is: ~/.local/share/profanity/chatlogs/account-name/rooms/channel-name/2019_08_02.log.

So the MUC messages are in the rooms subfolder.
However profanity creates the ~/.local/share/profanity/chatlogs/account-name/channel-name/2019_08_02.log too. They actually contain MUC 1:1 messages.

So for example Martin messages me via MUC 1:1 and in profanity I see:

Wed 10:23:23 AM - profanity@rooms.dismail.de/Martin: Hi

The log file will then be: .local/share/profanity/chatlogs/my-account-at-server/profanity_at_rooms.dismail.de/2019_09_04.log and look like:

10:48:13 - profanity@rooms.dismail.de: Hi

So one has no idea who actually sent this message retrospectively.

@jubalh jubalh changed the title MUC logging doesnt seem to work Improve MUC 1:1 logging Sep 4, 2019
@jubalh jubalh added improvement and removed bug labels Sep 4, 2019
@jubalh
Copy link
Member Author

jubalh commented Sep 4, 2019

Seems there is no nice solution. Since from the from field we don't know whether its a regular message from user@server.org/resource or room@server.org/user.

So we could compare the barejid against the list of joined channels. But doing this for every message sounds wasteful to me. And it could be that we get such a MUC PM without being in the MUC..

@weiss advised to check for <x xmlns='http://jabber.org/protocol/muc#user' /> which clients should send.

(Also have to remember to check whether we send it..)

@kaffeekanne
Copy link
Contributor

where would you want to store MUC PMs when the "how" is resolved? In case of your example .local/share/profanity/chatlogs/my-account-at-server/profanity_at_rooms.dismails.de_<nickname>/2019_09_04.log or somewhere in .../rooms/...?

@jubalh
Copy link
Member Author

jubalh commented Oct 6, 2019

@kaffeekanne ~/.local/share/profanity/chatlogs/my-account-at-server/profanity_at_rooms.dismail.de_nick

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