Merge pull request #837 from git-marijus/master

basic changes for file activity
This commit is contained in:
git-marijus 2015-01-10 13:01:02 +01:00
commit 884fa8bf9f
4 changed files with 8 additions and 2 deletions

View File

@ -497,6 +497,7 @@ define ( 'ACTIVITY_FAVORITE', NAMESPACE_ACTIVITY_SCHEMA . 'favorite' );
define ( 'ACTIVITY_POKE', NAMESPACE_ZOT . '/activity/poke' );
define ( 'ACTIVITY_MOOD', NAMESPACE_ZOT . '/activity/mood' );
define ( 'ACTIVITY_FILE', NAMESPACE_ZOT . '/activity/file' );
define ( 'ACTIVITY_OBJ_COMMENT', NAMESPACE_ACTIVITY_SCHEMA . 'comment' );
define ( 'ACTIVITY_OBJ_NOTE', NAMESPACE_ACTIVITY_SCHEMA . 'note' );

View File

@ -264,6 +264,7 @@ function localize_item(&$item){
}
/*
// FIXME store parent item as object or target
// (and update to json storage)

View File

@ -835,7 +835,9 @@ function get_item_elements($x) {
if(array_key_exists('flags',$x) && in_array('deleted',$x['flags']))
$arr['item_restrict'] = ITEM_DELETED;
$arr['item_restrict'] = ITEM_DELETED;
if(array_key_exists('flags',$x) && in_array('hidden',$x['flags']))
$arr['item_restrict'] = ITEM_HIDDEN;
// Here's the deal - the site might be down or whatever but if there's a new person you've never
// seen before sending stuff to your stream, we MUST be able to look them up and import their data from their
@ -1306,6 +1308,8 @@ function encode_item_flags($item) {
if($item['item_restrict'] & ITEM_DELETED)
$ret[] = 'deleted';
if($item['item_restrict'] & ITEM_HIDDEN)
$ret[] = 'hidden';
if($item['item_flags'] & ITEM_THREAD_TOP)
$ret[] = 'thread_parent';
if($item['item_flags'] & ITEM_NSFW)

View File

@ -137,4 +137,4 @@ function mood_content(&$a) {
return $o;
}
}