Assign invitees to institutions automatically?

Hi Seafile Team,

we are using seafile with multi-institutions support. if a user (which is assigned to an institution) sends an invite to some external person, it would be very nice if this new account could be assigned to the same institution automatically.

right now, such invitees have no institution by default and a system admin has to assign it manually.

if you could point me to the relevant code (and I can find some spare time), I am willing to implement this.

Best,
Hp