From 57b600551740a5c960d73b43bd9030c5cbbfce14 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 25 Mar 2026 18:09:27 +0100 Subject: [PATCH 1/3] feat(hint): SIP calls Signed-off-by: Joas Schilling --- lib/Config.php | 2 +- src/components/LeftSidebar/LeftSidebar.vue | 17 +++++++++++- .../Participants/ParticipantsTab.vue | 26 ++++++++++++++++++- src/components/SelectPhoneNumber.vue | 24 ++++++++++++++++- src/services/CapabilitiesManager.ts | 10 +++++++ tests/php/CapabilitiesTest.php | 4 +-- 6 files changed, 77 insertions(+), 6 deletions(-) diff --git a/lib/Config.php b/lib/Config.php index 5153ea00dc1..a3dd01a365e 100644 --- a/lib/Config.php +++ b/lib/Config.php @@ -42,7 +42,7 @@ class Config { /** * 1. Call recording, … */ - public const FEATURE_HINT = 1; + public const FEATURE_HINT = 34; /** * Currently limiting to 1k users because the user_status API would yield diff --git a/src/components/LeftSidebar/LeftSidebar.vue b/src/components/LeftSidebar/LeftSidebar.vue index 17a7d2d8c7a..eea4bfbb567 100644 --- a/src/components/LeftSidebar/LeftSidebar.vue +++ b/src/components/LeftSidebar/LeftSidebar.vue @@ -124,6 +124,15 @@ {{ t('spreed', 'Call a phone number') }} + + + {{ t('spreed', 'Call a phone number') }} + @@ -348,7 +357,11 @@ import { useArrowNavigation } from '../../composables/useArrowNavigation.js' import { useGetToken } from '../../composables/useGetToken.ts' import { ATTENDEE, CONVERSATION } from '../../constants.ts' import BrowserStorage from '../../services/BrowserStorage.js' -import { getTalkConfig, hasTalkFeature } from '../../services/CapabilitiesManager.ts' +import { + getTalkConfig, + hasTalkFeature, + showTalkFeatureHint, +} from '../../services/CapabilitiesManager.ts' import { createLegacyConversation, fetchNoteToSelfConversation, @@ -372,6 +385,7 @@ const canModerateSipDialOut = hasTalkFeature('local', 'sip-support-dialout') && getTalkConfig('local', 'call', 'sip-enabled') && getTalkConfig('local', 'call', 'sip-dialout-enabled') && getTalkConfig('local', 'call', 'can-enable-sip') +const hintSipDialOut = !canModerateSipDialOut && showTalkFeatureHint(34) const canNoteToSelf = hasTalkFeature('local', 'note-to-self') const supportsArchive = hasTalkFeature('local', 'archived-conversations-v2') const supportThreads = hasTalkFeature('local', 'threads') @@ -458,6 +472,7 @@ export default { talkHashStore, isMobile, canModerateSipDialOut, + hintSipDialOut, canNoteToSelf, supportsArchive, supportThreads, diff --git a/src/components/RightSidebar/Participants/ParticipantsTab.vue b/src/components/RightSidebar/Participants/ParticipantsTab.vue index 5ac678896a3..4df2a0e57ec 100644 --- a/src/components/RightSidebar/Participants/ParticipantsTab.vue +++ b/src/components/RightSidebar/Participants/ParticipantsTab.vue @@ -29,6 +29,10 @@ v-if="canAddPhones" v-model:value="searchText" @submit="addParticipants(participantPhoneItem)" /> + + + @@ -99,7 +111,11 @@ import { useGetToken } from '../../../composables/useGetToken.ts' import { useIsInCall } from '../../../composables/useIsInCall.js' import { useSortParticipants } from '../../../composables/useSortParticipants.js' import { ATTENDEE, CONVERSATION } from '../../../constants.ts' -import { getTalkConfig, hasTalkFeature } from '../../../services/CapabilitiesManager.ts' +import { + getTalkConfig, + hasTalkFeature, + showTalkFeatureHint, +} from '../../../services/CapabilitiesManager.ts' import { autocompleteQuery } from '../../../services/coreService.ts' import { EventBus } from '../../../services/EventBus.ts' import { addParticipant } from '../../../services/participantsService.js' @@ -227,6 +243,14 @@ export default { return canModerateSipDialOut && this.conversation.canEnableSIP }, + hintAddPhones() { + const canModerateSipDialOut = hasTalkFeature(this.token, 'sip-support-dialout') + && getTalkConfig(this.token, 'call', 'sip-enabled') + && getTalkConfig(this.token, 'call', 'sip-dialout-enabled') + && getTalkConfig(this.token, 'call', 'can-enable-sip') + return !canModerateSipDialOut && showTalkFeatureHint(34) + }, + isSearching() { return this.searchText !== '' }, diff --git a/src/components/SelectPhoneNumber.vue b/src/components/SelectPhoneNumber.vue index 43840b326df..752874e2d4a 100644 --- a/src/components/SelectPhoneNumber.vue +++ b/src/components/SelectPhoneNumber.vue @@ -7,7 +7,20 @@
    -