aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-12-28 23:21:49 -0800
committerfriendica <info@friendica.com>2014-12-28 23:21:49 -0800
commit3065650683c221c0a23c1dbcab2e1ec2d73997d4 (patch)
treeee5b2c9792a6621be462834b3eb0689a9e86291d
parentb7d2b9c1efdc429fc172477bec82673181f25d02 (diff)
downloadvolse-hubzilla-3065650683c221c0a23c1dbcab2e1ec2d73997d4.tar.gz
volse-hubzilla-3065650683c221c0a23c1dbcab2e1ec2d73997d4.tar.bz2
volse-hubzilla-3065650683c221c0a23c1dbcab2e1ec2d73997d4.zip
filter posts you author from unseen notifications - note there are other ways to do this, but involve some code complexity. This is easier to implement but may have a slight impact on the ping query performance. It's not horrid, just mentioning for the record.
-rwxr-xr-xboot.php2
-rw-r--r--mod/ping.php13
-rw-r--r--version.inc2
3 files changed, 12 insertions, 5 deletions
diff --git a/boot.php b/boot.php
index a8c84c7b9..4e266f4f1 100755
--- a/boot.php
+++ b/boot.php
@@ -241,6 +241,8 @@ define ( 'PHOTO_XCHAN', 0x0002 );
define ( 'PHOTO_THING', 0x0004 );
define ( 'PHOTO_ADULT', 0x0008 );
+define ( 'PHOTO_FLAG_OS', 0x4000 );
+
/**
* Menu types
*/
diff --git a/mod/ping.php b/mod/ping.php
index ef8afd91c..cdb6aa0b2 100644
--- a/mod/ping.php
+++ b/mod/ping.php
@@ -46,6 +46,7 @@ function ping_init(&$a) {
if(local_user()) {
$vnotify = get_pconfig(local_user(),'system','vnotify');
$evdays = intval(get_pconfig(local_user(),'system','evdays'));
+ $ob_hash = get_observer_hash();
}
// if unset show all visual notification types
@@ -275,10 +276,12 @@ function ping_init(&$a) {
$result = array();
$r = q("SELECT * FROM item
- WHERE item_restrict = %d and ( item_flags & %d ) > 0 and uid = %d",
+ WHERE item_restrict = %d and ( item_flags & %d ) > 0 and uid = %d
+ and author_xchan != '%s' ",
intval(ITEM_VISIBLE),
intval(ITEM_UNSEEN),
- intval(local_user())
+ intval(local_user()),
+ dbesc($ob_hash)
);
if($r) {
@@ -381,10 +384,12 @@ function ping_init(&$a) {
if($vnotify & (VNOTIFY_NETWORK|VNOTIFY_CHANNEL)) {
$r = q("SELECT id, item_restrict, item_flags FROM item
- WHERE (item_restrict = %d) and ( item_flags & %d ) > 0 and uid = %d",
+ WHERE (item_restrict = %d) and ( item_flags & %d ) > 0 and uid = %d
+ and author_xchan != '%s'",
intval(ITEM_VISIBLE),
intval(ITEM_UNSEEN),
- intval(local_user())
+ intval(local_user()),
+ dbesc($ob_hash)
);
if($r) {
diff --git a/version.inc b/version.inc
index 9523d00d1..43e85b852 100644
--- a/version.inc
+++ b/version.inc
@@ -1 +1 @@
-2014-12-27.902
+2014-12-28.903