forked from cory/tildefriends
		
	Friends of friends of connections is one step further than intended.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3626 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
		| @@ -410,11 +410,20 @@ static void _tf_ssb_rpc_on_connections_changed(tf_ssb_t* ssb, tf_ssb_change_t ch | ||||
| 		return; | ||||
| 	} | ||||
|  | ||||
| 	char connection_id[k_id_base64_len]; | ||||
| 	char id[k_id_base64_len]; | ||||
| 	if (tf_ssb_connection_get_id(connection, id, sizeof(id))) { | ||||
| 	if (tf_ssb_connection_get_id(connection, connection_id, sizeof(connection_id)) && | ||||
| 		tf_ssb_whoami(ssb, id, sizeof(id))) { | ||||
| 		const char** ids = tf_ssb_get_following_deep(ssb, (const char*[]) { id, NULL }, 2); | ||||
| 		bool found_connection_id = false; | ||||
| 		for (int i = 0; ids && ids[i]; i++) { | ||||
| 			tf_ssb_rpc_send_createHistoryStream(connection, ids[i]); | ||||
| 			if (strcmp(ids[i], connection_id) == 0) { | ||||
| 				found_connection_id = true; | ||||
| 			} | ||||
| 		} | ||||
| 		if (!found_connection_id) { | ||||
| 			tf_ssb_rpc_send_createHistoryStream(connection, connection_id); | ||||
| 		} | ||||
| 		free(ids); | ||||
| 	} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user