Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(capabilities): implement a wrapper for capabilities #12208

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Antreesy
Copy link
Contributor

@Antreesy Antreesy commented Apr 25, 2024

☑️ Resolves

🖌️ UI Checklist

🖼️ Screenshots / Screencasts

No visual changes

🚧 Tasks

  • Implement logic to check if room is federated, to fetch remote capabilities
    • Think of a way to store/ retrive remote capabilities
      As it's a request to server, it should be asyncronous. That means we must in some case to wait for remote capabilities or re-render application based on response (which is now isn't happen and requires a reload, if capability has changed
      Reload as we do for dirty hash
  • Implement helpers like hasFeature to replace long getCapabilities()?.spreed?.features?.includes('capability')
  • Distinguish between whether to consider local/remote capability (see ref issue)

🏁 Checklist

  • 🌏 Tested with Chrome, Firefox and Safari or should not be risky to browser differences
  • 🖥️ Tested with Desktop client or should not be risky for it
  • 🖌️ Design was reviewed, approved or inspired by the design team
  • ⛑️ Tests are included or not possible
  • 📗 User documentation in https://github.com/nextcloud/documentation/tree/master/user_manual/talk has been updated or is not required

@Antreesy Antreesy added this to the 💙 Next Major (30) milestone Apr 25, 2024
@Antreesy Antreesy self-assigned this Apr 25, 2024
@Antreesy Antreesy force-pushed the feat/11850/capabilities-wrapper branch 2 times, most recently from e1c3b1f to 47bb67c Compare April 28, 2024 20:30
Copy link
Contributor

@DorraJaouad DorraJaouad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use store instead of browser storage. The purpose of keeping the last previous fetched capabilities is to check in case the new fetch renders a different list (on the same page) -> store is enough for that.

@Antreesy
Copy link
Contributor Author

Antreesy commented May 2, 2024

You can use store instead of browser storage.

Might not work well for some files (as we have components, which are using Vue, and files like service/webrtc
Looks like we shoud handle each case differently..

-- not needed
🟢 any user
🟡 moderator
🔴 administrator

File check once for instance check on created/setup check on token update
AdminSettings/RecordingServers.vue 🔴 -- --
views/AdminSettings.vue 🔴 -- --
src/views/FlowPostToConversation.vue 🟢 -- --
CallView/CallView.vue -- 🟢 (rendered on each call) --
ChatView.vue -- 🟢 🟢
ConversationIcon.vue -- 🟢 🟢
BasicInfo.vue -- 🟢 🟢
ConversationSettingsDialog.vue -- 🟡 🟡
NotificationsSettings.vue -- 🟢 🟢
RecordingConsentSettings.vue -- 🟡 🟡
LeftSidebar.vue -- 🟢 (SIP, local only) --
MediaSettings.vue -- 🟢 🟢
VideoBackgroundEditor.vue -- 🟢 🟢
Message.vue -- 🟢 (translation, local only -> ChatView and provide) --
MessageButtonsBar.vue -- 🟢 (rendered on each switch) --
FilePreview.vue -- 🟢 🟢
MessageBody.vue -- 🟢 (rendered on each switch) --
NewConversationSetupPage.vue -- 🟢 (local, avatar) --
NewMessage.vue -- 🟢 🟢
NewMessageUploadEditor.vue -- 🟢 🟢
Participant.vue -- 🟢 (rendered on each switch) --
ParticipantsTab.vue -- 🟢 (SIP) 🟢
RightSidebar.vue -- 🟢 🟢
RoomSelector.vue -- 🟢 🟢
SettingsDialog.vue -- 🟢 (local) --
CallButton.vue -- 🟢 🟢
TopBar.vue -- 🟢 🟢
TopBarMenu.vue -- 🟢 🟢
src/composables/useActiveSession.js -- depends on where state is --
src/services/conversationsService.js 🟢 should be local? -- --
src/store/messagesStore.js -- -- 🟢 (rendered on each switch)
src/utils/webrtc/index.js 🟢 local for now -- --

@Antreesy Antreesy force-pushed the feat/11850/capabilities-wrapper branch from 47bb67c to 0bf4beb Compare May 8, 2024 16:53
@Antreesy Antreesy changed the base branch from main to feat/noid/add-local-capabilities May 8, 2024 16:54
@Antreesy Antreesy force-pushed the feat/11850/capabilities-wrapper branch from 0bf4beb to 77bc7dd Compare May 10, 2024 08:40
Base automatically changed from feat/noid/add-local-capabilities to main May 10, 2024 10:28
@Antreesy Antreesy force-pushed the feat/11850/capabilities-wrapper branch from 77bc7dd to 326799e Compare May 15, 2024 09:16
- check talk-hash when joining federated conversation
- keep and retrieve capabilities from BrowserStorage
- distinguish cases for local and remote capabilities
- implement 'hasTalkFeature' and 'getTalkConfig' helpers
- respect local-only features and configs

Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
…with conversation switch)

Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
…ion related)

Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
@Antreesy Antreesy force-pushed the feat/11850/capabilities-wrapper branch from 326799e to 30650ac Compare May 29, 2024 14:09
@Antreesy Antreesy marked this pull request as ready for review May 29, 2024 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🏗️ In progress
Development

Successfully merging this pull request may close these issues.

Check capabilities of remote server in federated conversations
2 participants