mirror of
https://github.com/servalproject/serval-dna.git
synced 2024-12-20 21:53:12 +00:00
Check authorship when opening message ply's
This commit is contained in:
parent
b38cc82b82
commit
50a3f51c10
@ -203,7 +203,13 @@ int message_ply_read_open(struct message_ply_read *ply, const rhizome_bid_t *bid
|
||||
|
||||
assert(m->filesize != RHIZOME_SIZE_UNSET);
|
||||
ply->bundle_id = m->keypair.public_key;
|
||||
ply->author = m->author;
|
||||
rhizome_lookup_author(m);
|
||||
if (m->authorship == AUTHOR_LOCAL || m->authorship == AUTHOR_REMOTE)
|
||||
ply->author = m->author;
|
||||
else if(m->has_sender)
|
||||
ply->author = m->sender;
|
||||
else
|
||||
bzero(&ply->author, sizeof(ply->author));
|
||||
ply->read.offset = ply->read.length = m->filesize;
|
||||
if (m->name && *m->name)
|
||||
ply->name = str_edup(m->name);
|
||||
|
Loading…
Reference in New Issue
Block a user