Change 'is_activity' to the inverse, 'is_post_verb'
This commit is contained in:
parent
679d2995a5
commit
1eceb0888a
|
@ -606,12 +606,7 @@ class QvitterPlugin extends Plugin {
|
|||
}
|
||||
}
|
||||
|
||||
if($notice->source == 'activity' || $notice->object_type == 'activity' || $notice->object_type == 'http://activitystrea.ms/schema/1.0/activity' || $notice->verb == 'delete') {
|
||||
$twitter_status['is_activity'] = true;
|
||||
}
|
||||
else {
|
||||
$twitter_status['is_activity'] = false;
|
||||
}
|
||||
$twitter_status['is_post_verb'] = ActivityUtils::compareVerbs(ActivityVerb::POST, array($notice->verb));
|
||||
|
||||
if(ActivityUtils::compareTypes($notice->verb, array('qvitter-delete-notice', 'delete'))) {
|
||||
$twitter_status['qvitter_delete_notice'] = true;
|
||||
|
|
|
@ -1550,7 +1550,7 @@ function addToFeed(feed, after, extraClasses) {
|
|||
if(window.currentStreamObject.name == 'notifications') {
|
||||
|
||||
// don't show any notices with object_type "activity"
|
||||
if(typeof obj.notice != 'undefined' && obj.notice !== null && obj.notice.is_activity === true) {
|
||||
if(typeof obj.notice != 'undefined' && obj.notice !== null && obj.notice.is_post_verb === false) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -1861,7 +1861,7 @@ function buildQueetHtml(obj, idInStream, extraClasses, requeeted_by, isConversat
|
|||
}
|
||||
|
||||
// activity? (hidden with css)
|
||||
if(obj.source == 'activity' || obj.is_activity === true) {
|
||||
if(obj.source == 'activity' || obj.is_post_verb === false) {
|
||||
extraClasses += ' activity always-hidden';
|
||||
|
||||
// because we had an xss issue with activities, the obj.statusnet_html of qvitter-deleted-activity-notices can contain unwanted html, so we escape, they are hidden anyway
|
||||
|
|
|
@ -832,7 +832,7 @@ function searchForUpdatedNoticeData(obj) {
|
|||
// sometimes activity notices don't get the is_activity flag set to true
|
||||
// maybe because they were in the process of being saved when
|
||||
// we first got them
|
||||
if(obj.is_activity) {
|
||||
if(obj.is_post_verb === false) {
|
||||
streamItemFoundInFeed.addClass('activity always-hidden');
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user