Store the diaspora signature differently

This commit is contained in:
Michael 2020-05-13 05:48:26 +00:00
parent c4062ddb3b
commit 13bd43f3f6
2 changed files with 22 additions and 31 deletions

View file

@ -2384,7 +2384,11 @@ class DFRN
// We store the data from "dfrn:diaspora_signature" in a different table, this is done in "Item::insert"
$dsprsig = XML::unescape(XML::getFirstNodeValue($xpath, "dfrn:diaspora_signature/text()", $entry));
if ($dsprsig != "") {
$item["dsprsig"] = $dsprsig;
$signature = json_decode(base64_decode($dsprsig));
// We don't store the old style signatures anymore that also contained the "signature" and "signer"
if (!empty($signature->signed_text) && empty($signature->signature) && empty($signature->signer)) {
$item["diaspora_signed_text"] = $signature->signed_text;
}
}
$item["verb"] = XML::getFirstNodeValue($xpath, "activity:verb/text()", $entry);