Skip to content

requestVerificationDM throws Error: unknown userId #5070

@danilobassi8

Description

@danilobassi8

Hi, I'm creating an Angular app that uses Matrix js sdk under the hood. And I'm getting an error when trying to verify a user via QR.

I am able to chat, and use e2e encryption in a room. But the issue is, when I call the function requestVerificationDM I got the following error:

ERROR Error: unknown userId @ch0m3:localhost
Image

As I said, it is weird because I am able to chat with that user in a room with E2E encryption. But I don't know why I am getting this error.
I don't know if I am doing something wrong or its an error from this package. Here is my code:

  async getValidationRequest(contact: Contact) {
    const crypto = this.matrixChat.client.getCrypto();

    let request = await crypto.findVerificationRequestDMInProgress(contact.roomId, contact.matrixId);

    if (!request) {
      request = await crypto.requestVerificationDM(contact.matrixId, contact.roomId);
    }
    return request;
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    X-Needs-InfoThis issue is blocked awaiting information from the reporter

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions