Merge pull request #281 from mmn/align_with_gnusocial_activitymoderation
Disable qvitter-delete-notice if ActivityModeration plugin exists
This commit is contained in:
commit
4abe665c4b
|
@ -572,7 +572,7 @@ class QvitterPlugin extends Plugin {
|
||||||
$twitter_status['is_activity'] = false;
|
$twitter_status['is_activity'] = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if($notice->verb == 'qvitter-delete-notice') {
|
if(ActivityUtils::compareTypes($notice->verb, array('qvitter-delete-notice', 'delete'))) {
|
||||||
$twitter_status['qvitter_delete_notice'] = true;
|
$twitter_status['qvitter_delete_notice'] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -797,7 +797,7 @@ class QvitterPlugin extends Plugin {
|
||||||
$user_is_deleted = true;
|
$user_is_deleted = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!$user_is_deleted) {
|
if(!$user_is_deleted && class_exists('StatusNet') && !array_key_exists('ActivityModeration', StatusNet::getActivePlugins())) {
|
||||||
$rendered = sprintf(_m('<a href="%1$s">%2$s</a> deleted notice <a href="%3$s">{{%4$s}}</a>.'),
|
$rendered = sprintf(_m('<a href="%1$s">%2$s</a> deleted notice <a href="%3$s">{{%4$s}}</a>.'),
|
||||||
htmlspecialchars($profile->getUrl()),
|
htmlspecialchars($profile->getUrl()),
|
||||||
htmlspecialchars($profile->getBestName()),
|
htmlspecialchars($profile->getBestName()),
|
||||||
|
@ -835,7 +835,7 @@ class QvitterPlugin extends Plugin {
|
||||||
|
|
||||||
public function onEndHandleFeedEntry($activity) {
|
public function onEndHandleFeedEntry($activity) {
|
||||||
|
|
||||||
if($activity->verb == 'qvitter-delete-notice') {
|
if($activity->verb == 'qvitter-delete-notice' && class_exists('StatusNet') && !array_key_exists('ActivityModeration', StatusNet::getActivePlugins())) {
|
||||||
|
|
||||||
$deleter_profile_uri = $activity->actor->id;
|
$deleter_profile_uri = $activity->actor->id;
|
||||||
$deleted_notice_uri = $activity->objects[0]->objects[0]->content;
|
$deleted_notice_uri = $activity->objects[0]->objects[0]->content;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user