diff --git a/src/components/RightSidebar/RightSidebar.vue b/src/components/RightSidebar/RightSidebar.vue
index 532eda75b46..ffab9a2eeb9 100644
--- a/src/components/RightSidebar/RightSidebar.vue
+++ b/src/components/RightSidebar/RightSidebar.vue
@@ -93,6 +93,17 @@
+
+
+
+
+
+
@@ -104,6 +115,7 @@ import FolderMultipleImage from 'vue-material-design-icons/FolderMultipleImage.v
import InformationOutline from 'vue-material-design-icons/InformationOutline.vue'
import Message from 'vue-material-design-icons/Message.vue'
import MessageText from 'vue-material-design-icons/MessageText.vue'
+import TextSearchVariant from 'vue-material-design-icons/TextSearchVariant.vue'
import { showMessage } from '@nextcloud/dialogs'
import { emit, subscribe, unsubscribe } from '@nextcloud/event-bus'
@@ -116,6 +128,7 @@ import NcButton from '@nextcloud/vue/dist/Components/NcButton.js'
import BreakoutRoomsTab from './BreakoutRooms/BreakoutRoomsTab.vue'
import LobbyStatus from './LobbyStatus.vue'
import ParticipantsTab from './Participants/ParticipantsTab.vue'
+import SearchMessagesTab from './SearchMessages/SearchMessagesTab.vue'
import SharedItemsTab from './SharedItems/SharedItemsTab.vue'
import SipSettings from './SipSettings.vue'
import ChatView from '../ChatView.vue'
@@ -136,6 +149,7 @@ export default {
NcAppSidebarTab,
NcButton,
ParticipantsTab,
+ SearchMessagesTab,
SetGuestUsername,
SharedItemsTab,
SipSettings,
@@ -147,6 +161,7 @@ export default {
InformationOutline,
Message,
MessageText,
+ TextSearchVariant,
},
props: {
@@ -269,6 +284,10 @@ export default {
return this.getUserId && (!this.supportFederationV1 || !this.conversation.remoteServer)
},
+ showSearchMessagesTab() {
+ return this.getUserId
+ },
+
showDetailsTab() {
return !this.getUserId || this.showSIPSettings
},
diff --git a/src/components/RightSidebar/SearchMessages/SearchMessagesTab.vue b/src/components/RightSidebar/SearchMessages/SearchMessagesTab.vue
new file mode 100644
index 00000000000..41e891d960b
--- /dev/null
+++ b/src/components/RightSidebar/SearchMessages/SearchMessagesTab.vue
@@ -0,0 +1,405 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.subline }}
+
+
+
+
+
+
+
+
+ {{ t('spreed', 'Load more results') }}
+
+
+
+
+
+
+
+
+
+
diff --git a/src/services/messagesService.ts b/src/services/messagesService.ts
index 1650f1834ba..870b7d9c2e8 100644
--- a/src/services/messagesService.ts
+++ b/src/services/messagesService.ts
@@ -36,6 +36,7 @@ type PostNewMessagePayload = Omit & { token: st
type PostNewMessageOptions = Pick & object
type DeleteMessagePayload = { token: string, id: number }
type EditMessagePayload = { token: string, messageId: number, updatedMessage: editMessageParams['message'] }
+type SearchMessagePayload = { term: string, person?: string, since?: string, until?: string, cursor?: number, limit?: number, conversation?: string }
/**
* Fetches messages that belong to a particular conversation
@@ -224,6 +225,13 @@ const summarizeChat = async function(token: string, fromMessageId: summarizeChat
} as summarizeChatParams, options)
}
+const searchMessages = async function(params: SearchMessagePayload, options: object) {
+ return axios.get(generateOcsUrl('search/providers/talk-message/search'), {
+ ...options,
+ params,
+ }).catch(() => {})
+}
+
export {
fetchMessages,
lookForNewMessages,
@@ -236,4 +244,5 @@ export {
updateLastReadMessage,
setConversationUnread,
summarizeChat,
+ searchMessages,
}