summaryrefslogtreecommitdiff
path: root/src/attach.cpp
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2023-12-02 12:55:46 +0100
committerRoman Smrž <roman.smrz@seznam.cz>2023-12-02 13:15:58 +0100
commit40230a02c0630be311fb27aa68cd5e441801e67d (patch)
treeecebdb9c04c127e6f82e5dda9d41ce535ec0923a /src/attach.cpp
parentf097f6473095fa04ff52ac7ee33a8dc435144a6f (diff)
Accept extended identity from device attachment
Diffstat (limited to 'src/attach.cpp')
-rw-r--r--src/attach.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/attach.cpp b/src/attach.cpp
index 74bc875..3d351f8 100644
--- a/src/attach.cpp
+++ b/src/attach.cpp
@@ -34,14 +34,13 @@ void AttachService::attachTo(const Peer & peer)
Stored<AttachIdentity> AttachService::handlePairingComplete(const Peer & peer)
{
auto owner = peer.server().identity().finalOwner();
- auto id = peer.identity()->ref();
- auto prev = Stored<Signed<IdentityData>>::load(*peer.identity()->ref());
+ auto pid = peer.identity();
auto idata = peer.tempStorage().store(IdentityData {
- .prev = { prev },
+ .prev = pid->data(),
.name = nullopt,
- .owner = Stored<Signed<IdentityData>>::load(*owner.ref()),
- .keyIdentity = prev->data->keyIdentity,
+ .owner = owner.data()[0],
+ .keyIdentity = pid->keyIdentity(),
.keyMessage = nullopt,
});