This commit is contained in:
Christien Rioux 2023-08-05 01:15:08 -04:00
parent 8bb8285e50
commit 3af819e28b
2 changed files with 9 additions and 2 deletions

View File

@ -107,7 +107,7 @@ class PasteInviteDialogState extends ConsumerState<PasteInviteDialog> {
var lastline =
lines.indexWhere((element) => element.contains('END VEILIDCHAT'));
if (lastline != -1) {
if (lastline == -1) {
lastline = lines.length;
}
if (lastline <= firstline) {
@ -127,6 +127,13 @@ class PasteInviteDialogState extends ConsumerState<PasteInviteDialog> {
final contactRequestInboxKey = proto.TypedKeyProto.fromProto(
contactInvitation.contactRequestInboxKey);
// xxx should ensure contact request is not from ourselves
// xxx or implement as 'note to self' but this could be done more carefully
// xxx this operation gets the wrong parent. can we allow opening dht records
// xxx that we already have open for readonly?
// xxx test on multiple devices
// Open context request inbox subkey zero to get the contact request object
final pool = await DHTRecordPool.instance();
await (await pool.openRead(contactRequestInboxKey))

View File

@ -93,7 +93,7 @@ Future<Uint8List> createContactInvitation(
final crpriv = ContactRequestPrivate()
..writerKey = writer.key.toProto()
..profile = activeAccountInfo.account.profile
..accountMasterRecordKey =
..identityMasterRecordKey =
activeAccountInfo.userLogin.accountMasterRecordKey.toProto()
..chatRecordKey = localConversation.key.toProto()
..expiration = expiration?.toInt64() ?? Int64.ZERO;