test: Test the response to the new session
This commit is contained in:
parent
b5d39339d1
commit
399f8033a3
@ -29,7 +29,25 @@ void main() {
|
||||
aliceSession.device.id,
|
||||
aliceMessage.encryptedKeys,
|
||||
);
|
||||
|
||||
expect(messagePlaintext, bobMessage);
|
||||
|
||||
// Bob responds to Alice
|
||||
final bobResponseText = 'Oh, hello Alice!';
|
||||
final bobResponseMessage = await bobSession.encryptToJid(
|
||||
aliceJid,
|
||||
bobResponseText,
|
||||
);
|
||||
|
||||
// Bob sends the message to Alice
|
||||
// ...
|
||||
|
||||
// Alice decrypts it
|
||||
final aliceReceivedMessage = await aliceSession.decryptMessage(
|
||||
bobResponseMessage.ciphertext,
|
||||
bobJid,
|
||||
bobSession.device.id,
|
||||
bobResponseMessage.encryptedKeys,
|
||||
);
|
||||
expect(bobResponseText, aliceReceivedMessage);
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user