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

Fix chatlogs for outgoing carbons #1446

Merged
merged 2 commits into from
Dec 10, 2020
Merged

Fix chatlogs for outgoing carbons #1446

merged 2 commits into from
Dec 10, 2020

Conversation

jubalh
Copy link
Member

@jubalh jubalh commented Dec 8, 2020

Doesn't make sense to log if plain is not set in all cases.

Regards #1439

Doesn't make sense to log if plain is not set in all cases.

Regards #1439
@jubalh jubalh added the bug label Dec 8, 2020
@jubalh jubalh added this to the 0.10.0 milestone Dec 8, 2020
@jubalh jubalh requested a review from wstrm December 8, 2020 11:30
@jubalh jubalh self-assigned this Dec 8, 2020
@jubalh
Copy link
Member Author

jubalh commented Dec 8, 2020

@aereaux could you test whether this solves #1439 ?

@aereaux
Copy link

aereaux commented Dec 8, 2020

It looks like this does not fix it, unfortunately.

@jubalh
Copy link
Member Author

jubalh commented Dec 8, 2020

What about additionally:

diff --git a/src/event/server_events.c b/src/event/server_events.c
index 27f142eb..f2d8aea4 100644
--- a/src/event/server_events.c
+++ b/src/event/server_events.c
@@ -659,14 +659,19 @@ sv_ev_incoming_carbon(ProfMessage* message)
 #endif
     }
 
+    gboolean logit = TRUE;
+    if (message->type == PROF_MSG_TYPE_MUCPM) {
+        logit = FALSE;
+    }
+
     if (message->enc == PROF_MSG_ENC_OX) {
-        _sv_ev_incoming_ox(chatwin, new_win, message, FALSE);
+        _sv_ev_incoming_ox(chatwin, new_win, message, logit);
     } else if (message->encrypted) {
-        _sv_ev_incoming_pgp(chatwin, new_win, message, FALSE);
+        _sv_ev_incoming_pgp(chatwin, new_win, message, logit);
     } else if (message->enc == PROF_MSG_ENC_OMEMO) {
-        _sv_ev_incoming_omemo(chatwin, new_win, message, FALSE);
+        _sv_ev_incoming_omemo(chatwin, new_win, message, logit);
     } else {
-        _sv_ev_incoming_plain(chatwin, new_win, message, FALSE);
+        _sv_ev_incoming_plain(chatwin, new_win, message, logit);
     }
     rosterwin_roster();
     return;

@jubalh
Copy link
Member Author

jubalh commented Dec 9, 2020

@aereaux I pushed it to this branch too. Maybe you can test this branch again.

@aereaux
Copy link

aereaux commented Dec 9, 2020

Looks to me like this fixes it now. Thanks!

@jubalh
Copy link
Member Author

jubalh commented Dec 10, 2020

Great! Thanks for testing!

@jubalh jubalh merged commit 150ce35 into master Dec 10, 2020
@jubalh jubalh deleted the fix/1439-chatlogs branch June 30, 2021 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants