Browse Source

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

pull/1052/head
Michael Vogel 8 years ago
parent
commit
5114e018d0
  1. 4
      include/diaspora.php
  2. 2
      include/items.php
  3. 1
      include/onepoll.php

4
include/diaspora.php

@ -872,7 +872,8 @@ function diaspora_post($importer,$xml,$msg) {
$datarray['uid'] = $importer['uid'];
$datarray['contact-id'] = $contact['id'];
$datarray['wall'] = 0;
$datarray['network'] = NETWORK_DIASPORA;
$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;

2
include/items.php

@ -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');

1
include/onepoll.php

@ -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);

Loading…
Cancel
Save