Simplify references to VerificationRequest
(#11045)
* Use new `VerificationRequest.getQRCodeBytes()` * Use new `VerificationRequest.otherDeviceId` * Remove references to `VerificationRequest.channel` * Replace references to `VerificationRequest.{requesting,receiving}UserId` Normally these are guarded by `request.initiatedByMe` so we can trivially replace it with `request.otherUserId` or `client.getUserId()`. In one place we actually need to apply some logic. * increase test coverage * Even more test coverage * Even more test coverage
This commit is contained in:
parent
ac2c9cef8d
commit
34439ee652
12 changed files with 310 additions and 33 deletions
|
@ -15,19 +15,18 @@ limitations under the License.
|
|||
*/
|
||||
|
||||
import React from "react";
|
||||
import { QRCodeData } from "matrix-js-sdk/src/crypto/verification/QRCode";
|
||||
|
||||
import QRCode from "../QRCode";
|
||||
|
||||
interface IProps {
|
||||
qrCodeData: QRCodeData;
|
||||
qrCodeBytes: Buffer;
|
||||
}
|
||||
|
||||
export default class VerificationQRCode extends React.PureComponent<IProps> {
|
||||
public render(): React.ReactNode {
|
||||
return (
|
||||
<QRCode
|
||||
data={[{ data: this.props.qrCodeData.getBuffer(), mode: "byte" }]}
|
||||
data={[{ data: this.props.qrCodeBytes, mode: "byte" }]}
|
||||
className="mx_VerificationQRCode"
|
||||
width={196}
|
||||
/>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue