Skip to content

Matrix: attempts to join already joined rooms #1865

Description

@Mikaela

Describe the bug

If I read the matterbridge log correctly, it attempts to call Matrix/Synapse API for joining rooms that it's already joined on.

To Reproduce

Have matterbridge connect to Matrix.

Expected behavior

What it should do instead is checking the sync response for what rooms it's in rather than always use that API.

Screenshots/debug logs

The gateway timeout is separate issue, but to my knowledge matterbridge is not supposed to attempt calling /_matrix/client/r0/join/ while already being a member of the room. Matrix doesn't leave users from rooms when they leave (unlike IRC and XMPP MUCs).

Jul 25 05:08:24 silta matterbridge[3715579]: time="2022-07-25T05:08:24+03:00" level=info msg="matrix.pirateriot: joining !ZqKikMKyQkIvUAiBqh:pirateriot.net (ID: !ZqKikMKyQkIvUAiBqh:pirateriot.netmatrix.p
irateriot)" prefix=matrix
Jul 25 05:09:24 silta matterbridge[3715579]: time="2022-07-25T05:09:24+03:00" level=error msg="Bridge matrix.pirateriot failed to join channel: contents=[60 104 116 109 108 62 13 10 60 104 101 97 100 62 
60 116 105 116 108 101 62 53 48 52 32 71 97 116 101 119 97 121 32 84 105 109 101 45 111 117 116 60 47 116 105 116 108 101 62 60 47 104 101 97 100 62 13 10 60 98 111 100 121 62 13 10 60 99 101 110 116 101
 114 62 60 104 49 62 53 48 52 32 71 97 116 101 119 97 121 32 84 105 109 101 45 111 117 116 60 47 104 49 62 60 47 99 101 110 116 101 114 62 13 10 60 104 114 62 60 99 101 110 116 101 114 62 110 103 105 110
 120 60 47 99 101 110 116 101 114 62 13 10 60 47 98 111 100 121 62 13 10 60 47 104 116 109 108 62 13 10] msg=Failed to POST JSON to /_matrix/client/r0/join/!ZqKikMKyQkIvUAiBqh:pirateriot.net: <html>
Jul 25 05:09:24 silta matterbridge[3715579]: <head><title>504 Gateway Time-out</title></head>                                                                                                              
Jul 25 05:09:24 silta matterbridge[3715579]: <body>                                                  
Jul 25 05:09:24 silta matterbridge[3715579]: <center><h1>504 Gateway Time-out</h1></center>                                                                                                                
Jul 25 05:09:24 silta matterbridge[3715579]: <hr><center>nginx</center>                                                                                                                                    
Jul 25 05:09:24 silta matterbridge[3715579]: </body>                                                 
Jul 25 05:09:24 silta matterbridge[3715579]: </html>                                                 
Jul 25 05:09:24 silta matterbridge[3715579]:  code=504 wrapped=" prefix=router                                                                                                                             
Jul 25 05:09:24 silta matterbridge[3715579]: time="2022-07-25T05:09:24+03:00" level=info msg="Starting bridge: irc.etro " prefix=router
Jul 25 05:09:24 silta matterbridge[3715579]: time="2022-07-25T05:09:24+03:00" level=info msg="Connecting etro.mikaela.info:6697" prefix=irc
Jul 25 05:09:34 silta matterbridge[3715579]: time="2022-07-25T05:09:34+03:00" level=info msg="Connection succeeded" prefix=irc
Jul 25 05:09:34 silta matterbridge[3715579]: time="2022-07-25T05:09:34+03:00" level=info msg="irc.etro: joining #test (ID: #testirc.etro)" prefix=irc
Jul 25 05:09:34 silta matterbridge[3715579]: time="2022-07-25T05:09:34+03:00" level=error msg="removing failed bridge matrix.pirateriot" prefix=router
Jul 25 05:09:34 silta matterbridge[3715579]: time="2022-07-25T05:09:34+03:00" level=error msg="removing failed bridge matrix.pirateriot" prefix=router
Jul 25 05:09:34 silta matterbridge[3715579]: time="2022-07-25T05:09:34+03:00" level=error msg="removing failed bridge matrix.pirateriot" prefix=router
Jul 25 05:09:34 silta matterbridge[3715579]: time="2022-07-25T05:09:34+03:00" level=error msg="removing failed bridge matrix.pirateriot" prefix=router
Jul 25 05:09:34 silta matterbridge[3715579]: time="2022-07-25T05:09:34+03:00" level=error msg="removing failed bridge matrix.pirateriot" prefix=router
Jul 25 05:09:34 silta matterbridge[3715579]: time="2022-07-25T05:09:34+03:00" level=error msg="removing failed bridge matrix.pirateriot" prefix=router
Jul 25 05:09:34 silta matterbridge[3715579]: time="2022-07-25T05:09:34+03:00" level=error msg="removing failed bridge matrix.pirateriot" prefix=router
Jul 25 05:09:34 silta matterbridge[3715579]: time="2022-07-25T05:09:34+03:00" level=error msg="removing failed bridge matrix.pirateriot" prefix=router
Jul 25 05:09:34 silta matterbridge[3715579]: time="2022-07-25T05:09:34+03:00" level=error msg="removing failed bridge matrix.pirateriot" prefix=router

Environment (please complete the following information):

  • OS: Ubuntu 22.04 LTS
  • Matterbridge version: 1.25.2 20f841c

Additional context

I don't think the config is relevant in this case, but available on request.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions