do not propagate channel deletion for an already deleted channel.

(cherry picked from commit 7c1e99884c)
This commit is contained in:
zotlabs 2018-10-03 02:42:21 +00:00 committed by Mario
parent 2acfa7e525
commit 22fbb512d5

View File

@ -2533,6 +2533,12 @@ function channel_remove($channel_id, $local = true, $unset_session = false) {
if(! $local) {
if(intval($r[0]['channel_removed'])) {
// already removed. do not propagate deletion of a channel which
// may have been removed locally at some previous time.
return;
}
$r = q("update channel set channel_deleted = '%s', channel_removed = 1 where channel_id = %d",
dbesc(datetime_convert()),
intval($channel_id)