undefined activity_compare which broke notifications (should be activity_match) and revamp xchan_query as abook is optional and need not be present - if it isn't there we still need the xchan, but if it is there we need to make sure that it belongs to whichever channel owns the post
This commit is contained in:
parent
3dcf9a1df7
commit
95d7514633
@ -1440,7 +1440,7 @@ function item_post_type($item) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(strlen($item['verb']) && (! activity_compare($item['verb'],ACTIVITY_POST)))
|
if(strlen($item['verb']) && (! activity_match($item['verb'],ACTIVITY_POST)))
|
||||||
$post_type = t('activity');
|
$post_type = t('activity');
|
||||||
|
|
||||||
return $post_type;
|
return $post_type;
|
||||||
@ -1556,8 +1556,8 @@ function xchan_query(&$items,$abook = true) {
|
|||||||
}
|
}
|
||||||
if(count($arr)) {
|
if(count($arr)) {
|
||||||
if($abook) {
|
if($abook) {
|
||||||
$chans = q("select * from xchan left join hubloc on hubloc_hash = xchan_hash left join abook on abook_xchan = xchan_hash
|
$chans = q("select * from xchan left join hubloc on hubloc_hash = xchan_hash left join abook on abook_xchan = xchan_hash and abook_channel = %d
|
||||||
where abook_channel = %d and xchan_hash in (" . implode(',', $arr) . ") and ( hubloc_flags & " . intval(HUBLOC_FLAGS_PRIMARY) . " )",
|
where xchan_hash in (" . implode(',', $arr) . ") and ( hubloc_flags & " . intval(HUBLOC_FLAGS_PRIMARY) . " )",
|
||||||
intval($item['uid'])
|
intval($item['uid'])
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user