update xchans on url change
This commit is contained in:
parent
022316fd49
commit
e7b6669dc3
2
bugs
2
bugs
@ -1,6 +1,4 @@
|
|||||||
- send refresh posts to everybody that needs to see it, e.g. when site url changes
|
- send refresh posts to everybody that needs to see it, e.g. when site url changes
|
||||||
|
|
||||||
- implement xchan refresh on remote sites when site url changes, currently hublocs are fixed but xchans aren't.
|
|
||||||
|
|
||||||
- when you clear one type of notification or view the target item, clear the corresponding system notification. Issue: what to do about matrix/network posts where you might not have actually seen it.
|
- when you clear one type of notification or view the target item, clear the corresponding system notification. Issue: what to do about matrix/network posts where you might not have actually seen it.
|
||||||
|
|
||||||
|
@ -454,12 +454,19 @@ function import_xchan($arr) {
|
|||||||
$new_flags = $r[0]['xchan_flags'];
|
$new_flags = $r[0]['xchan_flags'];
|
||||||
|
|
||||||
|
|
||||||
if(($r[0]['xchan_name_date'] != $arr['name_updated']) || ($r[0]['xchan_connurl'] != $arr['connections_url']) || ($r[0]['xchan_flags'] != $new_flags)) {
|
if(($r[0]['xchan_name_date'] != $arr['name_updated'])
|
||||||
$r = q("update xchan set xchan_name = '%s', xchan_name_date = '%s', xchan_connurl = '%s', xchan_flags = %d where xchan_hash = '%s' limit 1",
|
|| ($r[0]['xchan_connurl'] != $arr['connections_url'])
|
||||||
|
|| ($r[0]['xchan_flags'] != $new_flags)
|
||||||
|
|| ($r[0]['xchan_addr'] != $arr['address'])
|
||||||
|
|| ($r[0]['xchan_url'] != $arr['url'])) {
|
||||||
|
$r = q("update xchan set xchan_name = '%s', xchan_name_date = '%s', xchan_connurl = '%s', xchan_flags = %d,
|
||||||
|
xchan_addr = '%s', xchan_url = '%s' where xchan_hash = '%s' limit 1",
|
||||||
dbesc($arr['name']),
|
dbesc($arr['name']),
|
||||||
dbesc($arr['name_updated']),
|
dbesc($arr['name_updated']),
|
||||||
dbesc($arr['connections_url']),
|
dbesc($arr['connections_url']),
|
||||||
intval($new_flags),
|
intval($new_flags),
|
||||||
|
dbesc($arr['address']),
|
||||||
|
dbesc($arr['url']),
|
||||||
dbesc($xchan_hash)
|
dbesc($xchan_hash)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user