command line connect utility.

Usage: util/connect uid|nick channel

uid|nick must be a local channel. The target channel can be any channel. If a nick is supplied as a target it is assumed to refer to a channel on the localhost unless @host is provided. RSS feeds and remote networks can also be connected, assuming the appropriate protocols are already enabled for the local channel. If the target channel is a non-forum on the local system and you wish bi-directional communication to be enabled you will probably need to use a second connnect command with the source and target reversed.

Examples:

	util/connect bob marketing

	Connects bob to the marketing channel

	util/connect marketing bob

	Connects the marketing channel to bob.

	util/connect 6 channelone@macgirvin.com

	Connects the channel with channel_id 6 to the Channel One public forum.

	util/connect bob https://mysite.foo/feed.rss

	Connects bob to an RSS feed if RSS feeds are allowed as connections on this site

	util/connect bob jb@diasp.org

	Connects bob to a diaspora account on diap.org (both the site and Bob's channel must previously have the Diaspora Protocol enabled).
This commit is contained in:
zotlabs
2016-11-01 15:27:34 -07:00
parent 863ee9e6dd
commit b13fb1cca9
2 changed files with 66 additions and 2 deletions

View File

@@ -29,7 +29,7 @@ class Connect extends \Zotlabs\Web\Controller {
profile_load($which,'');
}
function post() {
function post() {
if(! array_key_exists('channel', \App::$data))
return;
@@ -78,7 +78,7 @@ class Connect extends \Zotlabs\Web\Controller {
function get() {
function get() {
$edit = ((local_channel() && (local_channel() == \App::$data['channel']['channel_id'])) ? true : false);