mirror of
https://github.com/element-hq/element-web
synced 2024-11-24 10:15:43 +03:00
103b60dfb5
* Implement MSC3819: Allowing widgets to send/receive to-device messages * Don't change the room events and state events drivers * Update to latest matrix-widget-api changes * Support sending encrypted to-device messages * Use queueToDevice for better reliability * Update types for latest WidgetDriver changes * Upgrade matrix-widget-api * Add tests * Test StopGapWidget * Fix a potential memory leak
82 lines
1.8 KiB
Text
82 lines
1.8 KiB
Text
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
|
|
exports[`StopGapWidgetDriver sendToDevice sends encrypted messages 1`] = `
|
|
Array [
|
|
Array [
|
|
Array [
|
|
Object {
|
|
"deviceInfo": DeviceInfo {
|
|
"algorithms": undefined,
|
|
"deviceId": "aliceWeb",
|
|
"keys": Object {},
|
|
"known": false,
|
|
"signatures": Object {},
|
|
"unsigned": Object {},
|
|
"verified": 0,
|
|
},
|
|
"userId": "@alice:example.org",
|
|
},
|
|
Object {
|
|
"deviceInfo": DeviceInfo {
|
|
"algorithms": undefined,
|
|
"deviceId": "aliceMobile",
|
|
"keys": Object {},
|
|
"known": false,
|
|
"signatures": Object {},
|
|
"unsigned": Object {},
|
|
"verified": 0,
|
|
},
|
|
"userId": "@alice:example.org",
|
|
},
|
|
],
|
|
Object {
|
|
"hello": "alice",
|
|
},
|
|
],
|
|
Array [
|
|
Array [
|
|
Object {
|
|
"deviceInfo": DeviceInfo {
|
|
"algorithms": undefined,
|
|
"deviceId": "bobDesktop",
|
|
"keys": Object {},
|
|
"known": false,
|
|
"signatures": Object {},
|
|
"unsigned": Object {},
|
|
"verified": 0,
|
|
},
|
|
"userId": "@bob:example.org",
|
|
},
|
|
],
|
|
Object {
|
|
"hello": "bob",
|
|
},
|
|
],
|
|
]
|
|
`;
|
|
|
|
exports[`StopGapWidgetDriver sendToDevice sends unencrypted messages 1`] = `
|
|
Array [
|
|
Array [
|
|
Object {
|
|
"batch": Array [
|
|
Object {
|
|
"deviceId": "*",
|
|
"payload": Object {
|
|
"hello": "alice",
|
|
},
|
|
"userId": "@alice:example.org",
|
|
},
|
|
Object {
|
|
"deviceId": "bobDesktop",
|
|
"payload": Object {
|
|
"hello": "bob",
|
|
},
|
|
"userId": "@bob:example.org",
|
|
},
|
|
],
|
|
"eventType": "org.example.foo",
|
|
},
|
|
],
|
|
]
|
|
`;
|