aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
Diffstat (limited to 'mod')
-rw-r--r--mod/feed.php3
-rw-r--r--mod/post.php16
-rw-r--r--mod/zotfeed.php2
3 files changed, 19 insertions, 2 deletions
diff --git a/mod/feed.php b/mod/feed.php
index 776f9787f..3b622fc17 100644
--- a/mod/feed.php
+++ b/mod/feed.php
@@ -12,6 +12,9 @@ function feed_init(&$a) {
$params['type'] = ((stristr(argv(0),'json')) ? 'json' : 'xml');
$params['pages'] = ((x($_REQUEST,'pages')) ? intval($_REQUEST['pages']) : 0);
$params['top'] = ((x($_REQUEST,'top')) ? intval($_REQUEST['top']) : 0);
+ $params['start'] = ((x($params,'start')) ? intval($params['start']) : 0);
+ $params['records'] = ((x($params,'records')) ? intval($params['records']) : 40);
+ $params['direction'] = ((x($params,'direction')) ? dbesc($params['direction']) : 'desc');
$channel = '';
if(argc() > 1) {
diff --git a/mod/post.php b/mod/post.php
index d62233ca1..8ffd3b5ad 100644
--- a/mod/post.php
+++ b/mod/post.php
@@ -507,6 +507,7 @@ function post_post(&$a) {
json_return_and_die($ret);
}
+
if($msgtype === 'pickup') {
/**
@@ -597,7 +598,14 @@ function post_post(&$a) {
$ret['success'] = true;
$ret['pickup'] = array();
foreach($r as $rr) {
- $ret['pickup'][] = array('notify' => json_decode($rr['outq_notify'],true),'message' => json_decode($rr['outq_msg'],true));
+ $x = json_decode($rr['outq_msg'],true);
+
+ if(array_key_exists('message_list',$x)) {
+ foreach($x['message_list'] as $xx)
+ $ret['pickup'][] = array('notify' => json_decode($rr['outq_notify'],true),'message' => $xx);
+ }
+ else
+ $ret['pickup'][] = array('notify' => json_decode($rr['outq_notify'],true),'message' => $x);
$x = q("delete from outq where outq_hash = '%s' limit 1",
dbesc($rr['outq_hash'])
@@ -796,6 +804,12 @@ function post_post(&$a) {
json_return_and_die($ret);
}
+ if($msgtype === 'request') {
+ // request a particular post/conversation by message_id
+ $x = zot_process_message_request($data);
+ json_return_and_die($x);
+ }
+
if($msgtype === 'purge') {
if($recipients) {
diff --git a/mod/zotfeed.php b/mod/zotfeed.php
index 480e886cd..c730e4162 100644
--- a/mod/zotfeed.php
+++ b/mod/zotfeed.php
@@ -38,7 +38,7 @@ function zotfeed_init(&$a) {
logger('zotfeed request: ' . $r[0]['channel_name'], LOGGER_DEBUG);
- $result['messages'] = zot_feed($r[0]['channel_id'],$observer['xchan_hash'],$mindate);
+ $result['messages'] = zot_feed($r[0]['channel_id'],$observer['xchan_hash'],array('mindate' => $mindate));
$result['success'] = true;
json_return_and_die($result);