What is wrong with this statement using Libsync::build_sync_packet(...)@!
Zap This statement does not sync an "item" to the clone. Any idea, why?
Libsync::build_sync_packet(channel_id, array('items' => array(an item)));
I call it after I created the item and to update the item....
function syncPermissionItem() {
// check and return
$r = q("SELECT * "
. "FROM "
. " item "
. "WHERE "
. " uid = %d "
. " AND title = '%s' "
. " AND app = '%s' "
. "LIMIT 1", //
intval($this->owner['channel_id']), //
dbesc("view_faces"), //
dbesc("faces")
);
if (!$r) {
logger('ERROR just befor to sync the permission item to clones. Item to hold permissions for faces does not exist. You should never see this message in the logs.');
json_return_and_die(array('status' => false, 'errormsg' => 'Failed to sync permissions using item'));
}
logger('About to sync permission item to clones.');
$this->acl_item = $r[0];
logger(print_r($this->acl_item, true), LOGGER_DEBUG);
Libsync::build_sync_packet($this->owner['channel_id'], array('items' => array($this->acl_item)));
}
The log on the sender side is...
2020-05-06T09:49:41Z:LOG_INFO:0d3ca5b076:Mod_Faces.php:366:syncPermissionItem: About to sync permission item to clones.
2020-05-06T09:49:41Z:LOG_INFO:0d3ca5b076:Mod_Faces.php:370:syncPermissionItem: Array
(
[id] => 75651
[mid] => https://z.digitalesparadies.de/item/70b12659-b649-49ef-a81d-49c7743a05e7
[uuid] => 70b12659-b649-49ef-a81d-49c7743a05e7
[aid] => 29
[uid] => 17
[parent] => 0
[parent_mid] =>
[thr_parent] =>
[item_level] => 0
[created] => 2020-05-06 09:42:11
[edited] => 2020-05-06 09:49:41
[expires] => 0001-01-01 00:00:00
[commented] => 0001-01-01 00:00:00
[received] => 0001-01-01 00:00:00
[changed] => 2020-05-06 09:49:41
[comments_closed] => 0001-01-01 00:00:00
[owner_xchan] => KvIVO427GY0NTZgvK92aPKfyl5CgWoEuc-iZaiPXOhbuREMIqAmuC2BASdDAhcDK4DfllEhhJxn_mYOy4MIWDg
[author_xchan] => KvIVO427GY0NTZgvK92aPKfyl5CgWoEuc-iZaiPXOhbuREMIqAmuC2BASdDAhcDK4DfllEhhJxn_mYOy4MIWDg
[source_xchan] =>
[mimetype] => application/json
[title] => view_faces
[summary] =>
[body] =>
[html] =>
[app] => faces
[lang] =>
[revision] => 0
[verb] =>
[obj_type] => permission
[obj] =>
[tgt_type] =>
[target] =>
[layout_mid] =>
[postopts] =>
[route] =>
[llink] =>
[plink] =>
[resource_id] =>
[resource_type] =>
[attach] =>
[sig] =>
[location] =>
[coord] =>
[public_policy] =>
[comment_policy] =>
[allow_cid] =>
[allow_gid] => <8561832a-7632-4f7e-a4bf-4c2f7fc46ee1>
[deny_cid] =>
[deny_gid] =>
[item_restrict] => 0
[item_flags] => 0
[item_private] => 0
[item_origin] => 0
[item_unseen] => 0
[item_starred] => 0
[item_uplink] => 0
[item_consensus] => 0
[item_wall] => 0
[item_thread_top] => 0
[item_notshown] => 0
[item_nsfw] => 0
[item_relay] => 0
[item_mentionsme] => 0
[item_nocomment] => 0
[item_obscured] => 0
[item_verified] => 0
[item_retained] => 0
[item_rss] => 0
[item_deleted] => 0
[item_type] => 0
[item_hidden] => 0
[item_unpublished] => 0
[item_delayed] => 0
[item_pending_remove] => 0
[item_blocked] => 0
[replyto] =>
)
2020-05-06T09:49:41Z:LOG_INFO:0d3ca5b076:Mod_Faces.php:304:setACL: sending post response for setting permissons successfully...
2020-05-06T09:49:41Z:LOG_INFO:df47d3f23b:Queue.php:297:deliver: deliver: dest: https://wolke7.digitalesparadies.de/zot
2020-05-06T09:49:41Z:LOG_INFO:df47d3f23b:Queue.php:325:deliver: remote
2020-05-06T09:49:41Z:LOG_INFO:df47d3f23b:Queue.php:348:deliver: deliver: remote zot delivery succeeded to https://wolke7.digitalesparadies.de/zot
2020-05-06T09:49:41Z:LOG_INFO:df47d3f23b:Queue.php:70:remove: queue: remove queue item 16d9a7fd3e3e02b44c5531ac2a3f35122a589965c0bd3631f947a9baf817698b
2020-05-06T09:49:41Z:LOG_INFO:df47d3f23b:Libzot.php:1122:process_response: zot_process_response: Array
(
[success] => 1
[delivery_report] => Array
(
[0] => Array
(
[location] => https://wolke7.digitalesparadies.de
[sender] => KvIVO427GY0NTZgvK92aPKfyl5CgWoEuc-iZaiPXOhbuREMIqAmuC2BASdDAhcDK4DfllEhhJxn_mYOy4MIWDg
[recipient] => KvIVO427GY0NTZgvK92aPKfyl5CgWoEuc-iZaiPXOhbuREMIqAmuC2BASdDAhcDK4DfllEhhJxn_mYOy4MIWDg
[name] => oj
[message_id] => sync
[status] => channel sync delivered
[date] => 2020-05-06 09:49:41
)
)
)
The log of the receiving side (clone) is...
2020-05-06T09:49:41Z:LOG_INFO:d5adc8c48c:Libzot.php:1261:import: recipients: Array
(
[0] => KvIVO427GY0NTZgvK92aPKfyl5CgWoEuc-iZaiPXOhbuREMIqAmuC2BASdDAhcDK4DfllEhhJxn_mYOy4MIWDg
)
Any idea?