With notify_push enabled, changes to a federated share don't reach the desktop client.
If someone edits a file in a folder shared to me from another server, my desktop client
never picks it up. A newly shared federated folder has the same problem. Both show up fine
in the web UI, and the moment I open the folder in the web, the desktop client catches up.
Shares between users on the same server work fine. It's only federated (server-to-server) shares.
Steps to reproduce
- Two servers
A and B set up with federation, notify_push running on B.
- A user on
A shares a folder with a user on B, who accepts it.
- On
A, edit a file in that folder.
- Watch
B's desktop client. The change doesn't arrive.
- Open the folder in
B's web UI. Now the desktop client syncs it.
Why I think it happens
As far as I can tell, notify_push only reacts to changes in the local file cache. A federated
mount is pulled from the other server on demand, so B's file cache only updates when something
actually lists the folder (like opening it in the web). Nothing tells B that the remote changed,
so notify_push has nothing to send.
Looks like the same family as nextcloud/notify_push#86 (that one was groupfolders), so non-home
storages in general seem to have this gap.
Possible fix
The sending server already knows when a shared file changes. Could it tell the receiving server
over federation so the receiver re-scans that folder? That would update the receiver's file cache,
and notify_push would work the same as it does for local shares. There already seems to be a
federation notification channel for things like accept/unshare that could maybe carry an "updated"
message. A poll from the receiving side would work too but feels expensive at scale.
Can help test if useful.
Seen on 32, also reproduced on current master.
With
notify_pushenabled, changes to a federated share don't reach the desktop client.If someone edits a file in a folder shared to me from another server, my desktop client
never picks it up. A newly shared federated folder has the same problem. Both show up fine
in the web UI, and the moment I open the folder in the web, the desktop client catches up.
Shares between users on the same server work fine. It's only federated (server-to-server) shares.
Steps to reproduce
AandBset up with federation,notify_pushrunning onB.Ashares a folder with a user onB, who accepts it.A, edit a file in that folder.B's desktop client. The change doesn't arrive.B's web UI. Now the desktop client syncs it.Why I think it happens
As far as I can tell,
notify_pushonly reacts to changes in the local file cache. A federatedmount is pulled from the other server on demand, so
B's file cache only updates when somethingactually lists the folder (like opening it in the web). Nothing tells
Bthat the remote changed,so
notify_pushhas nothing to send.Looks like the same family as nextcloud/notify_push#86 (that one was groupfolders), so non-home
storages in general seem to have this gap.
Possible fix
The sending server already knows when a shared file changes. Could it tell the receiving server
over federation so the receiver re-scans that folder? That would update the receiver's file cache,
and
notify_pushwould work the same as it does for local shares. There already seems to be afederation notification channel for things like accept/unshare that could maybe carry an "updated"
message. A poll from the receiving side would work too but feels expensive at scale.
Can help test if useful.
Seen on 32, also reproduced on current master.