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

Profanity shows own messages twice in ejabberd mucs #1223

Closed
mdosch opened this issue Nov 8, 2019 · 3 comments
Closed

Profanity shows own messages twice in ejabberd mucs #1223

mdosch opened this issue Nov 8, 2019 · 3 comments
Assignees
Labels
Milestone

Comments

@mdosch
Copy link
Contributor

mdosch commented Nov 8, 2019

Own messages to a muc hosted on ejabberd are shown twice in profanity.

Expected Behavior

Show own messages only once.

Current Behavior

Own messages are shown twice.

Possible Solution

Environment

profanity --version
Profanity, version 0.7.1dev.master.b13ef584
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: libstrophe
Desktop notification support: Enabled
OTR support: Enabled (libotr 4.1.1)
PGP support: Enabled (libgpgme 1.13.1-unknown)
OMEMO support: Enabled
C plugins: Enabled
Python plugins: Enabled (2.7.17)
GTK icons: Enabled
@jubalh jubalh self-assigned this Nov 8, 2019
@jubalh jubalh added the bug label Nov 8, 2019
@jubalh jubalh added this to the 0.8.0 milestone Nov 8, 2019
@jubalh
Copy link
Member

jubalh commented Nov 8, 2019

The problem is that in _handle_groupchat() we look for STANZA_NS_STABLE_ID which will result in origin-id or stanza-id.
It seems like prosody servers send origin-id first, so this worked in all my tests. But actually we cannot be sure of the order.
So far we stopped after the first element was found.

I only found xmpp_stanza_get_child_by_ns() and xmpp_stanza_get_child_by_name() in libstrophe. But we need a combination of both.

So I created stanza_get_child_by_name_and_ns() for Profanity. I need to remember to upstream this to libstrophe later (if they really don't have such a function).

@jubalh jubalh closed this as completed in 68af0aa Nov 8, 2019
@jubalh
Copy link
Member

jubalh commented Nov 8, 2019

@mdosch I pushed a fix to master. Please verify that it works :)

@mdosch
Copy link
Contributor Author

mdosch commented Nov 8, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants