Browse Source

statusnet improvements

pull/1/head
Friendika 10 years ago
parent
commit
9816f14d40
2 changed files with 7 additions and 3 deletions
  1. +2
    -2
      include/items.php
  2. +5
    -1
      mod/salmon.php

+ 2
- 2
include/items.php View File

@ -1449,11 +1449,11 @@ function new_follower($importer,$contact,$datarray,$item) {
}
else {
// create contact record - set to readonly
// create contact record
$r = q("INSERT INTO `contact` ( `uid`, `created`, `url`, `name`, `nick`, `photo`, `network`, `rel`,
`blocked`, `readonly`, `pending`, `writable` )
VALUES ( %d, '%s', '%s', '%s', '%s', '%s', '%s', %d, 0, 1, 1, 1 ) ",
VALUES ( %d, '%s', '%s', '%s', '%s', '%s', '%s', %d, 0, 0, 1, 1 ) ",
intval($importer['uid']),
dbesc(datetime_convert()),
dbesc($url),


+ 5
- 1
mod/salmon.php View File

@ -183,7 +183,11 @@ function salmon_post(&$a) {
if(! count($r)) {
logger('mod-salmon: Author unknown to us.');
}
if((count($r)) && ($r[0]['readonly'])) {
// is this a follower? Or have we ignored the person?
// If so we can not accept this post.
if((count($r)) && (($r[0]['readonly']) || ($r[0]['rel'] == REL_VIP)) {
logger('mod-salmon: Ignoring this author.');
salmon_return(202);
// NOTREACHED


Loading…
Cancel
Save