mirror of
https://gitlab.com/veilid/veilidchat.git
synced 2025-12-10 14:06:38 -05:00
invitation work
This commit is contained in:
parent
95ed8b28a0
commit
7496a1a2a7
22 changed files with 591 additions and 47 deletions
|
|
@ -131,15 +131,22 @@ extension IdentityMasterExtension on IdentityMaster {
|
|||
// Create new account to insert into identity
|
||||
await (await pool.create(parent: identityRec.key))
|
||||
.deleteScope((accountRec) async {
|
||||
// Make empty contact list
|
||||
final contactList =
|
||||
await (await DHTShortArray.create(parent: accountRec.key))
|
||||
.scope((r) => r.record.ownedDHTRecordPointer);
|
||||
|
||||
// Make empty contact invitation record list
|
||||
final contactInvitationRecords = await (await DHTShortArray.create())
|
||||
.scope((r) => r.record.ownedDHTRecordPointer);
|
||||
final contactInvitationRecords =
|
||||
await (await DHTShortArray.create(parent: accountRec.key))
|
||||
.scope((r) => r.record.ownedDHTRecordPointer);
|
||||
|
||||
// Make account object
|
||||
final account = proto.Account()
|
||||
..profile = (proto.Profile()
|
||||
..name = name
|
||||
..title = title)
|
||||
..contactList = contactList.toProto()
|
||||
..contactInvitationRecords = contactInvitationRecords.toProto();
|
||||
|
||||
// Write account key
|
||||
|
|
|
|||
|
|
@ -1700,6 +1700,7 @@ class ContactInvitationRecord extends $pb.GeneratedMessage {
|
|||
..aOM<TypedKey>(4, _omitFieldNames ? '' : 'chatRecordKey', subBuilder: TypedKey.create)
|
||||
..a<$fixnum.Int64>(5, _omitFieldNames ? '' : 'expiration', $pb.PbFieldType.OU6, defaultOrMaker: $fixnum.Int64.ZERO)
|
||||
..a<$core.List<$core.int>>(6, _omitFieldNames ? '' : 'invitation', $pb.PbFieldType.OY)
|
||||
..aOS(7, _omitFieldNames ? '' : 'message')
|
||||
..hasRequiredFields = false
|
||||
;
|
||||
|
||||
|
|
@ -1785,6 +1786,15 @@ class ContactInvitationRecord extends $pb.GeneratedMessage {
|
|||
$core.bool hasInvitation() => $_has(5);
|
||||
@$pb.TagNumber(6)
|
||||
void clearInvitation() => clearField(6);
|
||||
|
||||
@$pb.TagNumber(7)
|
||||
$core.String get message => $_getSZ(6);
|
||||
@$pb.TagNumber(7)
|
||||
set message($core.String v) { $_setString(6, v); }
|
||||
@$pb.TagNumber(7)
|
||||
$core.bool hasMessage() => $_has(6);
|
||||
@$pb.TagNumber(7)
|
||||
void clearMessage() => clearField(7);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -463,6 +463,7 @@ const ContactInvitationRecord$json = {
|
|||
{'1': 'chat_record_key', '3': 4, '4': 1, '5': 11, '6': '.TypedKey', '10': 'chatRecordKey'},
|
||||
{'1': 'expiration', '3': 5, '4': 1, '5': 4, '10': 'expiration'},
|
||||
{'1': 'invitation', '3': 6, '4': 1, '5': 12, '10': 'invitation'},
|
||||
{'1': 'message', '3': 7, '4': 1, '5': 9, '10': 'message'},
|
||||
],
|
||||
};
|
||||
|
||||
|
|
@ -473,5 +474,5 @@ final $typed_data.Uint8List contactInvitationRecordDescriptor = $convert.base64D
|
|||
'GAIgASgLMgouQ3J5cHRvS2V5Ugl3cml0ZXJLZXkSLwoNd3JpdGVyX3NlY3JldBgDIAEoCzIKLk'
|
||||
'NyeXB0b0tleVIMd3JpdGVyU2VjcmV0EjEKD2NoYXRfcmVjb3JkX2tleRgEIAEoCzIJLlR5cGVk'
|
||||
'S2V5Ug1jaGF0UmVjb3JkS2V5Eh4KCmV4cGlyYXRpb24YBSABKARSCmV4cGlyYXRpb24SHgoKaW'
|
||||
'52aXRhdGlvbhgGIAEoDFIKaW52aXRhdGlvbg==');
|
||||
'52aXRhdGlvbhgGIAEoDFIKaW52aXRhdGlvbhIYCgdtZXNzYWdlGAcgASgJUgdtZXNzYWdl');
|
||||
|
||||
|
|
|
|||
|
|
@ -344,6 +344,8 @@ message ContactInvitationRecord {
|
|||
TypedKey chat_record_key = 4;
|
||||
// Expiration timestamp
|
||||
uint64 expiration = 5;
|
||||
// A copy of the raw SignedContactResponse invitation bytes post-encryption and signing
|
||||
// A copy of the raw SignedContactInvitation invitation bytes post-encryption and signing
|
||||
bytes invitation = 6;
|
||||
// The message sent along with the invitation
|
||||
string message = 7;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue