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

Bridge sends messages to first Matrix account only, ignoring subsequent accounts #17500

Open
crmado opened this issue Jul 30, 2024 · 0 comments

Comments

@crmado
Copy link

crmado commented Jul 30, 2024

Description

Issue Description

When bridging a chat platform to Matrix, I've noticed that the first Matrix account used for bridging is recorded and remembered. If I attempt to bridge the same chat platform account to a second Matrix account, all bridged messages are still sent to the first Matrix account instead of the second one. This issue persists even after logging out the bot from the first Matrix account.

Steps to Reproduce

  1. Bridge a chat platform account to Matrix using Account A
  2. Attempt to bridge the same chat platform account to Matrix using Account B
  3. Observe that messages are still sent to Account A, not Account B

Expected Behavior

Messages should be sent to the most recently bridged Matrix account (Account B in this case).

Actual Behavior

Messages are always sent to the first Matrix account used for bridging (Account A), regardless of subsequent bridging attempts.

Additional Information

  • This behavior continues even after logging out the bridging bot from the first Matrix account.
  • The issue affects the ability to use multiple Matrix accounts with the same chat platform account.

Possible Solutions

  • Implement a way to reset or update the stored Matrix account for each bridged chat platform account.
  • Allow multiple Matrix accounts to receive messages from the same bridged chat platform account.

Would you like me to explain or elaborate on any part of this GitHub issue?

Steps to reproduce

  • Bridge a chat platform account to Matrix using Account A
  • Attempt to bridge the same chat platform account to Matrix using Account B
  • Observe that messages are still sent to Account A, not Account B

Homeserver

skaiqwenapi.skaispace.com

Synapse Version

1.105.0

Installation Method

Docker (matrixdotorg/synapse)

Database

using a single PostgreSQL server

Workers

Single process

Platform

ubuntu 22.04

Configuration

No response

Relevant log output

(base) user@user-WS-ESC700-G4-WS880T-E700-G4:~/Desktop/project/skai-matrix$ docker logs -t matrix-wechat
2024-07-30T02:25:22.885650845Z Ignoring incorrect config field type !!null at bridge->hs_proxy
2024-07-30T02:25:22.887405325Z 2024-07-30T10:25:22+08:00 INF Initializing bridge built_at=unknown go_version=go1.21.7 name=matrix-wechat version=0.2.4+dev.unknown
2024-07-30T02:25:22.887431197Z 2024-07-30T10:25:22+08:00 DBG Initializing database connection
2024-07-30T02:25:22.887439265Z 2024-07-30T10:25:22+08:00 DBG Initializing state store
2024-07-30T02:25:22.887715460Z 2024-07-30T10:25:22+08:00 DBG Initializing Matrix event processor
2024-07-30T02:25:22.887741869Z 2024-07-30T10:25:22+08:00 DBG Initializing Matrix event handler
2024-07-30T02:25:22.887753381Z 2024-07-30T10:25:22+08:00 DBG Bridge built with end-to-bridge encryption, but disabled in config
2024-07-30T02:25:22.887768477Z 2024-07-30T10:25:22+08:00 INF Bridge initialization complete, starting...
2024-07-30T02:25:22.887779499Z 2024-07-30T10:25:22+08:00 DBG Running database upgrades
2024-07-30T02:25:22.916245047Z 2024-07-30T10:25:22+08:00 INF Database is up to date current_version=1 db_section=main latest_known_version=1 oldest_compatible_version=1
2024-07-30T02:25:22.918857293Z 2024-07-30T10:25:22+08:00 INF Database is up to date current_version=5 db_section=matrix_state latest_known_version=5 oldest_compatible_version=5
2024-07-30T02:25:22.918873358Z 2024-07-30T10:25:22+08:00 DBG Starting application service HTTP server
2024-07-30T02:25:22.918932275Z 2024-07-30T10:25:22+08:00 DBG Checking connection to homeserver
2024-07-30T02:25:22.919108730Z 2024-07-30T10:25:22+08:00 INF Starting HTTP listener address=0.0.0.0:17778
2024-07-30T02:25:22.919904419Z 2024-07-30T10:25:22+08:00 WRN Request failed, retrying error="Get \"http://synapse:8008/_matrix/client/versions?user_id=%40wechatbot%3Askaiqwenapi.skaispace.com\": dial tcp 192.168.48.20:8008: connect: connection refused" as_user_id=@wechatbot:skaiqwenapi.skaispace.com req_id=1 retry_in_seconds=4
2024-07-30T02:25:26.925002223Z 2024-07-30T10:25:26+08:00 DBG Request completed as_user_id=@wechatbot:skaiqwenapi.skaispace.com duration=3.154636 method=GET req_id=1 response_length=931 response_mime=application/json status_code=200 url=http://synapse:8008/_matrix/client/versions?user_id=%40wechatbot%3Askaiqwenapi.skaispace.com
2024-07-30T02:25:26.930335173Z 2024-07-30T10:25:26+08:00 DBG Request completed as_user_id=@wechatbot:skaiqwenapi.skaispace.com duration=4.013395 method=GET req_id=2 response_length=67 response_mime=application/json status_code=200 url=http://synapse:8008/_matrix/client/v3/account/whoami?user_id=%40wechatbot%3Askaiqwenapi.skaispace.com
2024-07-30T02:25:26.934612651Z 2024-07-30T10:25:26+08:00 DBG Received ping from homeserver txn_id=mautrix-go_1722306326930297960_1
2024-07-30T02:25:26.936769212Z 2024-07-30T10:25:26+08:00 DBG Request completed as_user_id=@wechatbot:skaiqwenapi.skaispace.com duration=6.205865 method=POST req_body={"transaction_id":"mautrix-go_1722306326930297960_1"} req_id=3 response_length=17 response_mime=application/json status_code=200 url=http://synapse:8008/_matrix/client/v1/appservice/wechat/ping?user_id=%40wechatbot%3Askaiqwenapi.skaispace.com
2024-07-30T02:25:26.936795221Z 2024-07-30T10:25:26+08:00 DBG Homeserver -> bridge connection works duration_ms=4 txn_id=mautrix-go_1722306326930297960_1
2024-07-30T02:25:26.936812998Z 2024-07-30T10:25:26+08:00 DBG Starting event processor
2024-07-30T02:25:26.936885856Z 2024-07-30T10:25:26+08:00 INF Bridge started!
2024-07-30T02:25:26.937031656Z 2024-07-30T10:25:26+08:00 INF WechatService starting to listen on 0.0.0.0:20002 service=WeChat
2024-07-30T02:25:26.937043397Z 2024-07-30T10:25:26+08:00 DBG Starting custom puppets
2024-07-30T02:25:26.937049593Z 2024-07-30T10:25:26+08:00 DBG Updating bot profile
2024-07-30T02:25:26.938794929Z 2024-07-30T10:25:26+08:00 DBG Request completed as_user_id=@wechatbot:skaiqwenapi.skaispace.com duration=1.66248 method=GET req_id=4 response_length=26 response_mime=application/json status_code=200 url=http://synapse:8008/_matrix/media/v3/config?user_id=%40wechatbot%3Askaiqwenapi.skaispace.com
2024-07-30T02:25:26.953618283Z 2024-07-30T10:25:26+08:00 DBG Request completed as_user_id=@wechatbot:skaiqwenapi.skaispace.com duration=3.077688 method=GET req_id=5 response_length=58 response_mime=application/json status_code=200 url=http://synapse:8008/_matrix/client/v3/profile/@wechatbot:skaiqwenapi.skaispace.com/avatar_url?user_id=%40wechatbot%3Askaiqwenapi.skaispace.com
2024-07-30T02:25:26.957180165Z 2024-07-30T10:25:26+08:00 DBG Request completed as_user_id=@wechatbot:skaiqwenapi.skaispace.com duration=2.875704 method=GET req_id=6 response_length=35 response_mime=application/json status_code=200 url=http://synapse:8008/_matrix/client/v3/profile/@wechatbot:skaiqwenapi.skaispace.com/displayname?user_id=%40wechatbot%3Askaiqwenapi.skaispace.com
2024-07-30T02:25:33.841781081Z 2024-07-30T10:25:33+08:00 INF Agent connected from 192.168.48.9:57571 service=WeChat

Anything else that would be useful to know?

No response

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

No branches or pull requests

1 participant