forked from GNUsocial/gnu-social
OStatus sub/unsub updates:
- fix for PuSH unsub verification - send Salmon notification on unsub
This commit is contained in:
@@ -303,6 +303,12 @@ class ActivityVerb
|
||||
const FRIEND = 'http://activitystrea.ms/schema/1.0/make-friend';
|
||||
const JOIN = 'http://activitystrea.ms/schema/1.0/join';
|
||||
const TAG = 'http://activitystrea.ms/schema/1.0/tag';
|
||||
|
||||
// Custom OStatus verbs for the flipside until they're standardized
|
||||
const DELETE = 'http://ostatus.org/schema/1.0/unfollow';
|
||||
const UNFAVORITE = 'http://ostatus.org/schema/1.0/unfavorite';
|
||||
const UNFOLLOW = 'http://ostatus.org/schema/1.0/unfollow';
|
||||
const LEAVE = 'http://ostatus.org/schema/1.0/leave';
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -33,13 +33,14 @@ class HubVerifyQueueHandler extends QueueHandler
|
||||
{
|
||||
$sub = $data['sub'];
|
||||
$mode = $data['mode'];
|
||||
$token = $data['token'];
|
||||
|
||||
assert($sub instanceof HubSub);
|
||||
assert($mode === 'subscribe' || $mode === 'unsubscribe');
|
||||
|
||||
common_log(LOG_INFO, __METHOD__ . ": $mode $sub->callback $sub->topic");
|
||||
try {
|
||||
$sub->verify($mode);
|
||||
$sub->verify($mode, $token);
|
||||
} catch (Exception $e) {
|
||||
common_log(LOG_ERR, "Failed PuSH $mode verify to $sub->callback for $sub->topic: " .
|
||||
$e->getMessage());
|
||||
|
Reference in New Issue
Block a user