Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • poezio poezio
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 178
    • Issues 178
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 8
    • Merge requests 8
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • poezio
  • poeziopoezio
  • Issues
  • #3502

Closed
Open
Created Oct 05, 2019 by Jonas Schäfer@horazont

Messages from a MUC domain are silently dropped if they are received via carbon copy

Problem description

Messages of type "normal" and "chat" (others may apply too) which are sent from a MUC domain and delivered to Poezio via Carbons are not shown, at all. They are silently dropped. There is nothing written to errors.log.

Examples

(Note that I redacted my JIDs to be user@example/poezio and user@example/other-client. I also reformatted the XML for readability.)

Message which was shown (Directly, from MUC domain)
<message from="muc.poez.io" type="normal" to="user@example.com/poezio" id="f5bbed2d-3922-411b-be8b-c3caeb37b340-8A8E3">
  <body>Hello</body>
  <stanza-id xmlns="urn:xmpp:sid:0" by="user@example.com" id="2019-10-05-c8914a4d38e73c63" />
</message>
Message which was shown (Carbon-copied, from non-MUC domain)
<message from="user@example.com" type="normal" to="user@example.com/poezio" id="f5bbed2d-3922-411b-be8b-c3caeb37b340-8A8F4">
  <received xmlns="urn:xmpp:carbons:2">
    <forwarded xmlns="urn:xmpp:forward:0">
      <message xmlns="jabber:client" to="user@example.com/other-client" from="example.com" type="normal">
        <body>Hello</body>
        <stanza-id xmlns="urn:xmpp:sid:0" by="user@example.com" id="2019-10-05-f33935a3d2b1ac22" />
      </message>
    </forwarded>
  </received>
</message>
Message which was not shown (Carbon-copied, from MUC domain)
<message from="user@example.com" type="normal" to="user@example.com/poezio" id="f5bbed2d-3922-411b-be8b-c3caeb37b340-8A8FF">
  <received xmlns="urn:xmpp:carbons:2">
    <forwarded xmlns="urn:xmpp:forward:0">
      <message xmlns="jabber:client" to="user@example.com/other-client" from="muc.poez.io" type="normal">
        <body>Hello</body>
        <stanza-id xmlns="urn:xmpp:sid:0" by="user@example.com" id="2019-10-05-79fc69950cfa97e0" />
      </message>
    </forwarded>
  </received>
</message>

How to reproduce

You need a prosody server for this, sorry. You also need to have two clients connected to your account. Let us assume that your account is user@example.com and your clients are at user@example.com/poezio and user@example.com/something-else. Your account needs to be directly connected to your prosody.

  1. In the prosody telnet console, enter (remember that the leading > is important):

    >prosody.core_post_stanza(hosts["example.com"], require"util.stanza".message({type="normal",to="user@example.com/poezio",from="muc.poez.io"}):body("Hello"))

    Observe that the message is visible in Poezio.

  2. Next open the /xml_tab in poezio and then execute in the Prosody telnet console:

    >prosody.core_post_stanza(hosts["example.com"], require"util.stanza".message({type="normal",to="user@example.com/something-else",from="muc.poez.io"}):body("Hello"))

    Observe that the message is not shown in Poezio, despite it shows up in the /xml_tab.

  3. Try the same with a different sender:

    >prosody.core_post_stanza(hosts["example.com"], require"util.stanza".message({type="normal",to="user@example.com/something-else",from="example.com"}):body("Hello"))

    Note that this time the message is visible.

Edited Apr 15, 2021 by mathieui
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking