Add voice message analytics

This commit is contained in:
Alfonso Grillo 2023-11-03 11:47:38 +01:00 committed by Alfonso Grillo
parent 530985e674
commit 4985d410b3
5 changed files with 14 additions and 5 deletions

View File

@ -6648,7 +6648,7 @@
repositoryURL = "https://github.com/matrix-org/matrix-analytics-events";
requirement = {
kind = upToNextMinorVersion;
minimumVersion = 0.8.0;
minimumVersion = 0.9.0;
};
};
C13F55E4518415CB4C278E73 /* XCRemoteSwiftPackageReference "DTCoreText" */ = {

View File

@ -121,8 +121,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/matrix-org/matrix-analytics-events",
"state" : {
"revision" : "e9cd9adaf18cec52ed851395eb84358b4f9b8d7f",
"version" : "0.8.0"
"revision" : "aa14cbcdf81af2746d20a71779ec751f971e1d7f",
"version" : "0.9.0"
}
},
{
@ -263,7 +263,7 @@
{
"identity" : "swiftui-introspect",
"kind" : "remoteSourceControl",
"location" : "https://github.com/siteline/SwiftUI-Introspect",
"location" : "https://github.com/siteline/SwiftUI-Introspect.git",
"state" : {
"revision" : "b94da693e57eaf79d16464b8b7c90d09cba4e290",
"version" : "0.9.2"

View File

@ -1001,6 +1001,12 @@ class RoomScreenViewModel: RoomScreenViewModelType, RoomScreenViewModelProtocol
displayError(.alert(L10n.errorFailedUploadingVoiceMessage))
return
}
analytics.trackComposer(inThread: false,
isEditing: false,
isReply: false,
messageType: .voiceMessage,
startsThread: nil)
actionsSubject.send(.composer(action: .setMode(mode: .previewVoiceMessage(state: audioPlayerState, waveform: .url(recordingURL), isUploading: true))))
await voiceMessageRecorder.stopPlayback()

View File

@ -20,6 +20,7 @@ enum AnalyticsMessageType {
case location(LocationType)
case poll
case text
case voiceMessage
enum LocationType {
case pin
@ -36,6 +37,8 @@ extension AnalyticsEvent.Composer.MessageType {
self = .Poll
case .text:
self = .Text
case .voiceMessage:
self = .VoiceMessage
}
}

View File

@ -53,7 +53,7 @@ packages:
# path: ../compound-ios
AnalyticsEvents:
url: https://github.com/matrix-org/matrix-analytics-events
minorVersion: 0.8.0
minorVersion: 0.9.0
Emojibase:
url: https://github.com/matrix-org/emojibase-bindings
minorVersion: 1.0.0