aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2015-01-14 14:15:04 -0800
committerfriendica <info@friendica.com>2015-01-14 14:15:04 -0800
commit25e090148d456bab057c456f1446301a6ffe56f4 (patch)
treee4dcb48e63b2fb6a5950a2b88f536e7460003930
parent1005618fafdea956e2941d871bc74cb1158aa043 (diff)
downloadvolse-hubzilla-25e090148d456bab057c456f1446301a6ffe56f4.tar.gz
volse-hubzilla-25e090148d456bab057c456f1446301a6ffe56f4.tar.bz2
volse-hubzilla-25e090148d456bab057c456f1446301a6ffe56f4.zip
federate consensus items (in network only). Work in progress.
-rwxr-xr-xboot.php2
-rwxr-xr-xinclude/items.php7
2 files changed, 8 insertions, 1 deletions
diff --git a/boot.php b/boot.php
index 1de8bcc41..83bbcc3b2 100755
--- a/boot.php
+++ b/boot.php
@@ -569,7 +569,7 @@ define ( 'ITEM_ORIGIN', 0x0001);
define ( 'ITEM_UNSEEN', 0x0002);
define ( 'ITEM_STARRED', 0x0004);
define ( 'ITEM_UPLINK', 0x0008);
-define ( 'ITEM_UPLINK_PRV', 0x0010);
+define ( 'ITEM_CONSENSUS', 0x0010); // an item which may present agree/disagree/abstain options
define ( 'ITEM_WALL', 0x0020);
define ( 'ITEM_THREAD_TOP', 0x0040);
define ( 'ITEM_NOTSHOWN', 0x0080); // technically visible but not normally shown (e.g. like/dislike)
diff --git a/include/items.php b/include/items.php
index 5812efa90..e26180641 100755
--- a/include/items.php
+++ b/include/items.php
@@ -834,6 +834,11 @@ function get_item_elements($x) {
$arr['item_flags'] = 0;
+ if(array_key_exists('flags',$x) && in_array('consensus',$x['flags']))
+ $arr['item_flags'] |= ITEM_CONSENSUS;
+
+
+
if(array_key_exists('flags',$x) && in_array('deleted',$x['flags']))
$arr['item_restrict'] = ITEM_DELETED;
if(array_key_exists('flags',$x) && in_array('hidden',$x['flags']))
@@ -1314,6 +1319,8 @@ function encode_item_flags($item) {
$ret[] = 'thread_parent';
if($item['item_flags'] & ITEM_NSFW)
$ret[] = 'nsfw';
+ if($item['item_flags'] & ITEM_CONSENSUS)
+ $ret[] = 'consensus';
if($item['item_private'])
$ret[] = 'private';