echo-server icon indicating copy to clipboard operation
echo-server copied to clipboard

[bug] Client created with same client ID or device token but different tenant ID will break association with notifications

Open chris13524 opened this issue 1 year ago • 6 comments

Client created with same client ID or device token, but under different tenant will update the tenant ID of the client but not delete any associated notifications with the old tenant ID. Notifications are always queried by their tenant ID vs clients are not.

Two solutions:

  • Remove tenant_id column from notifications and use the tenant_id column of the clients table (if this is even needed at all)
  • Update the tenant_id or delete notifications when the client's tenant_id changes

chris13524 avatar May 21 '24 12:05 chris13524

E.g. happening in real world: https://walletconnect.slack.com/archives/C04DB2EAHE3/p1716951454311359?thread_ts=1716951454.311359&cid=C04DB2EAHE3

chris13524 avatar May 29 '24 08:05 chris13524

Client created with same client ID or device token, but under different tenant will update the tenant ID of the client but not delete any associated notifications with the old tenant ID. Notifications are always queried by their tenant ID vs clients are not.

Two solutions:

  • Remove tenant_id column from notifications and use the tenant_id column of the clients table (if this is even needed at all)
  • Update the tenant_id or delete notifications when the client's tenant_id changes

jdorman16 avatar Jun 09 '24 08:06 jdorman16

jdorman16 avatar Jun 09 '24 08:06 jdorman16

Client created with same client ID or device token, but under different tenant will update the tenant ID of the client but not delete any associated notifications with the old tenant ID. Notifications are always queried by their tenant ID vs clients are not.

Two solutions:

  • Remove tenant_id column from notifications and use the tenant_id column of the clients table (if this is even needed at all)
  • Update the tenant_id or delete notifications when the client's tenant_id changes

jdorman16 avatar Jun 09 '24 08:06 jdorman16

jdorman16 avatar Jun 09 '24 08:06 jdorman16

jdorman16 avatar Jun 09 '24 08:06 jdorman16