Setting "verb" for postings from Diaspora, Feeds and Mails

This commit is contained in:
Michael Vogel 2014-07-15 08:50:49 +02:00
parent a553dda2ef
commit 5114e018d0
3 changed files with 6 additions and 1 deletions

View file

@ -873,6 +873,7 @@ function diaspora_post($importer,$xml,$msg) {
$datarray['contact-id'] = $contact['id'];
$datarray['wall'] = 0;
$datarray['network'] = NETWORK_DIASPORA;
$datarray['verb'] = ACTIVITY_POST;
$datarray['guid'] = $guid;
$datarray['uri'] = $datarray['parent-uri'] = $message_id;
$datarray['changed'] = $datarray['created'] = $datarray['edited'] = datetime_convert('UTC','UTC',$created);
@ -1346,6 +1347,7 @@ function diaspora_comment($importer,$xml,$msg) {
$datarray['type'] = 'remote-comment';
$datarray['wall'] = $parent_item['wall'];
$datarray['network'] = NETWORK_DIASPORA;
$datarray['verb'] = ACTIVITY_POST;
$datarray['gravity'] = GRAVITY_COMMENT;
$datarray['guid'] = $guid;
$datarray['uri'] = $message_id;

View file

@ -678,6 +678,8 @@ function get_atom_elements($feed, $item, $contact = array()) {
if($rawgeo)
$res['coord'] = unxmlify($rawgeo[0]['data']);
if ($contact["network"] == NETWORK_FEED)
$res['verb'] = ACTIVITY_POST;
$rawverb = $item->get_item_tags(NAMESPACE_ACTIVITY, 'verb');

View file

@ -330,6 +330,7 @@ function onepoll_run(&$argv, &$argc){
logger("Mail: Parsing mail ".$msg_uid, LOGGER_DATA);
$datarray = array();
$datarray['verb'] = ACTIVITY_POST;
// $meta = email_msg_meta($mbox,$msg_uid);
// $headers = email_msg_headers($mbox,$msg_uid);