private mail from d* to r# seems to work with these edits. - Now have to go back the other way.

This commit is contained in:
friendica 2014-09-22 02:27:52 -07:00
parent 4aa1506c00
commit 2070dbfdea
2 changed files with 8 additions and 11 deletions

View File

@ -1431,7 +1431,8 @@ function diaspora_conversation($importer,$xml,$msg) {
return; return;
} }
if(($contact['rel'] == CONTACT_IS_FOLLOWER) || ($contact['blocked']) || ($contact['readonly'])) {
if(! perm_is_allowed($importer['channel_id'],$contact['xchan_hash'],'post_mail')) {
logger('diaspora_conversation: Ignoring this author.'); logger('diaspora_conversation: Ignoring this author.');
return 202; return 202;
} }
@ -1531,7 +1532,7 @@ function diaspora_conversation($importer,$xml,$msg) {
continue; continue;
} }
q("insert into mail ( `uid`, `convid`, `from_xchan`,`to_xchan`,`title`,`body`,`mail_flags`,`mid`,`parent_mid`,`created`) values ( %d, %d, '%s', '%s', '%s', '%s', %d, '%s', '%s', '%s')", q("insert into mail ( `channel_id`, `convid`, `from_xchan`,`to_xchan`,`title`,`body`,`mail_flags`,`mid`,`parent_mid`,`created`) values ( %d, %d, '%s', '%s', '%s', '%s', %d, '%s', '%s', '%s')",
intval($importer['channel_id']), intval($importer['channel_id']),
intval($conversation['id']), intval($conversation['id']),
dbesc($person['xchan_hash']), dbesc($person['xchan_hash']),
@ -1645,19 +1646,15 @@ function diaspora_message($importer,$xml,$msg) {
return; return;
} }
q("insert into mail ( `uid`, `guid`, `convid`, `from-name`,`from-photo`,`from-url`,`contact-id`,`title`,`body`,`seen`,`reply`,`uri`,`parent-uri`,`created`) values ( %d, '%s', %d, '%s', '%s', '%s', %d, '%s', '%s', %d, %d, '%s','%s','%s')", q("insert into mail ( `channel_id`, `convid`, `from_xchan`,`to_xchan`,`title`,`body`,`mail_flags`,`mid`,`parent_mid`,`created`) values ( %d, %d, '%s', '%s', '%s', '%s', '%d','%s','%s','%s')",
intval($importer['channel_id']), intval($importer['channel_id']),
dbesc($msg_guid),
intval($conversation['id']), intval($conversation['id']),
dbesc($person['name']), dbesc($person['xchan_hash']),
dbesc($person['photo']), dbesc($importer['xchan_hash']),
dbesc($person['url']),
intval($contact['id']),
dbesc($conversation['subject']), dbesc($conversation['subject']),
dbesc($body), dbesc($body),
0, 0,
1, dbesc($msg_guid),
dbesc($message_id),
dbesc($parent_uri), dbesc($parent_uri),
dbesc($msg_created_at) dbesc($msg_created_at)
); );

View File

@ -1 +1 @@
2014-09-21.805 2014-09-22.806