aboutsummaryrefslogblamecommitdiffstats
path: root/Zotlabs/Daemon/Zotconvo.php
blob: 188956d2662876d545e02f2067a67a1d4c4e976b (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12











                                                                    
                                


                               

                                                   

                               
 

                                


                               





                                                                           




                       
<?php

namespace Zotlabs\Daemon;

use Zotlabs\Lib\Libzot;

class Zotconvo {

	static public function run($argc, $argv) {

		logger('Zotconvo invoked: ' . print_r($argv, true));

		if ($argc < 3) {
			return;
		}

		$channels = explode(',', $argv[1]);
		if (!$channels) {
			return;
		}

		$mid = $argv[2];
		if (!$mid) {
			return;
		}

		$force = $argv[3] ?? false;

		foreach ($channels as $channel_id) {
			$channel = channelx_by_n($channel_id);
			Libzot::fetch_conversation($channel, $mid, $force);
		}

		return;

	}
}