Magicsig::generate is now static
This also fixes a problem with "initial salmon slap", which was a problem for newly registered accounts which would have their first salmon slap fail to distribute since there was a problem with Magicsig keys. Apparently we have to re-read them with importKeys so the Crypt_RSA objects publicKey and privateKey match later instances of them. I think it may have been that generate() doesn't specify a signatureMode, but I leave experimentation of that to the future.
This commit is contained in:
@@ -1344,9 +1344,7 @@ class OStatusPlugin extends Plugin
|
||||
// Get this profile's keypair
|
||||
$magicsig = Magicsig::getKV('user_id', $target->id);
|
||||
if (!$magicsig instanceof Magicsig && $target->isLocal()) {
|
||||
// No keypair yet, let's generate one. Only for local users.
|
||||
$magicsig = new Magicsig();
|
||||
$magicsig->generate($target->getUser());
|
||||
$magicsig = Magicsig::generate($target->getUser());
|
||||
}
|
||||
|
||||
if ($magicsig instanceof Magicsig) {
|
||||
|
Reference in New Issue
Block a user