spreed icon indicating copy to clipboard operation
spreed copied to clipboard

🌐 Federated invitation handling 💌 - API

Open nickvergessen opened this issue 2 years ago • 11 comments

  • Overview at https://github.com/nextcloud/spreed/issues/11229

  • [x] FederationController->acceptShare() could return to user, who accepted a share, a local room (with token. e.t.c), so it could be reused by clients to join room on click => https://github.com/nextcloud/spreed/pull/11459
  • [ ] Allow all users / only moderators / only specific groups on this server to invite users to Talk conversations from all other servers / only trusted servers - discuss? https://github.com/nextcloud/spreed/pull/11503
  • [x] Return conversation name in getInvitation endpoint https://github.com/nextcloud/spreed/pull/11505
  • [x] Prevent accepting the same invitation multiple times https://github.com/nextcloud/spreed/pull/11513
  • [x] Inviting the same user should not result in a new system message each time https://github.com/nextcloud/spreed/pull/11513
  • [x] Split subject and message for push notifications https://github.com/nextcloud/spreed/pull/11513
  • [x] The name (rich object) of the person which shared the conversation is missing on the invitation endpoint https://github.com/nextcloud/spreed/pull/11581

nickvergessen avatar Dec 19 '23 10:12 nickvergessen

  • [ ] Boolean - Allow incoming
  • [ ] Boolean - Allow outgoing
  • [ ] Array - List of groups allowed to federate
  • [ ] Boolean - Filter federation servers by trusted server list of server

nickvergessen avatar Jan 31 '24 10:01 nickvergessen

https://github.com/nextcloud/spreed/blob/2bf22e12d217572fb25d071b87a74c785d14b56a/lib/Model/Invitation.php#L72-L83

The endpoint to get federation invitation does not include the conversation name that the user was invited to, but the notification does include that in the rich parameters:

image

I assume we should add that to the invitation endpoint as well?!

SystemKeeper avatar Jan 31 '24 22:01 SystemKeeper

Same invitation can be accepted multiple times:

image

Inviting the same user does add a new system message each time (although no push notification):

image

SystemKeeper avatar Feb 01 '24 20:02 SystemKeeper

Please split subject and message:

https://github.com/nextcloud/spreed/blob/1ae1017d444731bc911939af52a70014a8d0ac20/lib/Notification/Notifier.php#L466-L467

As we did for recording:

https://github.com/nextcloud/spreed/blob/1ae1017d444731bc911939af52a70014a8d0ac20/lib/Notification/Notifier.php#L359-L368

So push notifications can correctly show a subject and a message

SystemKeeper avatar Feb 01 '24 21:02 SystemKeeper

Please split subject and message

I think we should at least have the inviter in the subject

Suggestion:

{user1} invited you to a federated conversation

{user1} invited you to join {roomName} on {remoteServer}

nickvergessen avatar Feb 02 '24 08:02 nickvergessen

Sounds good to me 👍

SystemKeeper avatar Feb 02 '24 08:02 SystemKeeper

  • Added to https://github.com/nextcloud/spreed/pull/11513

nickvergessen avatar Feb 02 '24 09:02 nickvergessen

The name of the person which shared the conversation is missing on the invitation endpoint, but it is available in the push notification. Can we add it to the endpoint as well?

SystemKeeper avatar Feb 02 '24 18:02 SystemKeeper

The name of the person which shared the conversation is missing on the invitation endpoint, but it is available in the push notification. Can we add it to the endpoint as well?

same for room name

mahibi avatar Feb 05 '24 11:02 mahibi

same for room name

Should be fixed with https://github.com/nextcloud/spreed/pull/11505 already

SystemKeeper avatar Feb 05 '24 11:02 SystemKeeper

Inviting the same user should not result in a new system message each time

  • -> Fixed in https://github.com/nextcloud/spreed/pull/11513

nickvergessen avatar Feb 05 '24 12:02 nickvergessen

Assuming all is done for now

nickvergessen avatar Feb 28 '24 17:02 nickvergessen