better (more consistent) handling of ostatus contacts
This commit is contained in:
		
							
								
								
									
										2
									
								
								boot.php
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								boot.php
									
									
									
									
									
								
							| @@ -4,7 +4,7 @@ set_time_limit(0); | ||||
| ini_set('pcre.backtrack_limit', 250000); | ||||
|  | ||||
|  | ||||
| define ( 'FRIENDIKA_VERSION',      '2.2.1027' ); | ||||
| define ( 'FRIENDIKA_VERSION',      '2.2.1028' ); | ||||
| define ( 'DFRN_PROTOCOL_VERSION',  '2.21'    ); | ||||
| define ( 'DB_UPDATE_VERSION',      1071      ); | ||||
|  | ||||
|   | ||||
| @@ -310,13 +310,22 @@ function poller_run($argv, $argc){ | ||||
|  | ||||
| 				// Upgrading DB fields from an older Friendika version | ||||
| 				// Will only do this once per notify-enabled OStatus contact | ||||
| 				// or if relationship changes | ||||
|  | ||||
| 				if(($contact['notify']) && (! $contact['writable'])) { | ||||
| 					q("UPDATE `contact` SET `writable` = 1 WHERE `id` = %d LIMIT 1", | ||||
| 				$stat_writeable = ((($contact['notify']) && ($contact['rel'] == REL_VIP || $contact['rel'] == REL_BUD)) ? 1 : 0); | ||||
|  | ||||
| 				if($stat_writeable != $contact['writable']) { | ||||
| 					q("UPDATE `contact` SET `writable` = %d WHERE `id` = %d LIMIT 1", | ||||
| 						intval($stat_writeable), | ||||
| 						intval($contact['id']) | ||||
| 					); | ||||
| 				} | ||||
|  | ||||
| 				// Are we allowed to import from this person? | ||||
|  | ||||
| 				if($contact['rel'] == REL_VIP || $contact['blocked'] || $contact['readonly']) | ||||
| 					continue; | ||||
|  | ||||
| 				$xml = fetch_url($contact['poll']); | ||||
| 			} | ||||
| 			elseif($contact['network'] === NETWORK_MAIL) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user