]> git.mxchange.org Git - friendica.git/commitdiff
The ID field will be stored with notifications as well.
authorMichael Vogel <icarus@dabo.de>
Tue, 21 Apr 2015 08:14:20 +0000 (10:14 +0200)
committerMichael Vogel <icarus@dabo.de>
Tue, 21 Apr 2015 08:14:20 +0000 (10:14 +0200)
include/diaspora.php
include/items.php
mod/ping.php

index 6b42e3c555dbdc6f2b51ec217ee3b15f923bcd4b..689f5765b3a3418be23921addf18fc083fd8237f 100755 (executable)
@@ -1473,6 +1473,8 @@ function diaspora_comment($importer,$xml,$msg) {
        DiasporaFetchGuid($datarray);
        $message_id = item_store($datarray);
 
+       $datarray['id'] = $message_id;
+
        //if($message_id) {
                //q("update item set plink = '%s' where id = %d",
                //      //dbesc($a->get_baseurl() . '/display/' . $importer['nickname'] . '/' . $message_id),
index 1fecc442158ec13736e8861a84b6d6c609ad50fd..ff31e84f7cab9baec570db3160eae70790eaaaef 100644 (file)
@@ -3660,6 +3660,9 @@ function local_delivery($importer,$data) {
                                $parent = 0;
 
                                if($posted_id) {
+
+                                       $datarray["id"] = $posted_id;
+
                                        $r = q("SELECT `parent`, `parent-uri` FROM `item` WHERE `id` = %d AND `uid` = %d LIMIT 1",
                                                intval($posted_id),
                                                intval($importer['importer_uid'])
index 6545ab458bc87936067436adae5c2ffceb9f0658..82265530dbf3baff5670c275ac9f5b4730f1aa11 100644 (file)
@@ -22,6 +22,10 @@ function ping_init(&$a) {
 
                $firehose = intval(get_pconfig(local_user(),'system','notify_full'));
 
+/*
+select notify.id, notify.type, iid, visible, deleted, CASE notify.iid WHEN 0 THEN 1 ELSE item.visible END as vis, CASE notify.iid WHEN 0 THEN 0 ELSE item.deleted END as del from notify left join item on item.id = notify.iid where notify.uid=1 group by notify.parent order by notify.id desc limit 10;
+*/
+
                $t = q("select count(*) as `total` from `notify` where `uid` = %d and `seen` = 0 AND `msg` != '' GROUP BY `parent`",
                        intval(local_user())
                );