mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-24 10:25:51 +03:00
Merge pull request #8789 from element-hq/feature/bca/bump_analytics_event
Update analytic events
This commit is contained in:
commit
def2a8a833
9 changed files with 396 additions and 3 deletions
|
@ -30,11 +30,44 @@ data class Error(
|
|||
*/
|
||||
val context: String? = null,
|
||||
/**
|
||||
* Which crypto module is the client currently using.
|
||||
* DEPRECATED: Which crypto module is the client currently using.
|
||||
*/
|
||||
val cryptoModule: CryptoModule? = null,
|
||||
/**
|
||||
* Which crypto backend is the client currently using.
|
||||
*/
|
||||
val cryptoSDK: CryptoSDK? = null,
|
||||
val domain: Domain,
|
||||
/**
|
||||
* An heuristic based on event origin_server_ts and the current device
|
||||
* creation time (origin_server_ts - device_ts). This would be used to
|
||||
* get the source of the event scroll-back/live/initialSync.
|
||||
*/
|
||||
val eventLocalAgeMillis: Int? = null,
|
||||
/**
|
||||
* true if userDomain != senderDomain.
|
||||
*/
|
||||
val isFederated: Boolean? = null,
|
||||
/**
|
||||
* true if the current user is using matrix.org.
|
||||
*/
|
||||
val isMatrixDotOrg: Boolean? = null,
|
||||
val name: Name,
|
||||
/**
|
||||
* UTDs can be permanent or temporary. If temporary, this field will
|
||||
* contain the time it took to decrypt the message in milliseconds. If
|
||||
* permanent should be -1.
|
||||
*/
|
||||
val timeToDecryptMillis: Int? = null,
|
||||
/**
|
||||
* true if the current user trusts their own identity (verified session)
|
||||
* at time of decryption.
|
||||
*/
|
||||
val userTrustsOwnIdentity: Boolean? = null,
|
||||
/**
|
||||
* true if that unable to decrypt error was visible to the user.
|
||||
*/
|
||||
val wasVisibleToUser: Boolean? = null,
|
||||
) : VectorAnalyticsEvent {
|
||||
|
||||
enum class Domain {
|
||||
|
@ -44,18 +77,79 @@ data class Error(
|
|||
}
|
||||
|
||||
enum class Name {
|
||||
|
||||
/**
|
||||
* E2EE domain error. Decryption failed for a message sent before the
|
||||
* device logged in, and key backup is not enabled.
|
||||
*/
|
||||
HistoricalMessage,
|
||||
|
||||
/**
|
||||
* E2EE domain error. The room key is known but is ratcheted (index >
|
||||
* 0).
|
||||
*/
|
||||
OlmIndexError,
|
||||
|
||||
/**
|
||||
* E2EE domain error. Generic unknown inbound group session error.
|
||||
*/
|
||||
OlmKeysNotSentError,
|
||||
|
||||
/**
|
||||
* E2EE domain error. Any other decryption error (missing field, format
|
||||
* errors...).
|
||||
*/
|
||||
OlmUnspecifiedError,
|
||||
|
||||
/**
|
||||
* TO_DEVICE domain error. The to-device message failed to decrypt.
|
||||
*/
|
||||
ToDeviceFailedToDecrypt,
|
||||
|
||||
/**
|
||||
* E2EE domain error. Decryption failed due to unknown error.
|
||||
*/
|
||||
UnknownError,
|
||||
|
||||
/**
|
||||
* VOIP domain error. ICE negotiation failed.
|
||||
*/
|
||||
VoipIceFailed,
|
||||
|
||||
/**
|
||||
* VOIP domain error. ICE negotiation timed out.
|
||||
*/
|
||||
VoipIceTimeout,
|
||||
|
||||
/**
|
||||
* VOIP domain error. The call invite timed out.
|
||||
*/
|
||||
VoipInviteTimeout,
|
||||
|
||||
/**
|
||||
* VOIP domain error. The user hung up the call.
|
||||
*/
|
||||
VoipUserHangup,
|
||||
|
||||
/**
|
||||
* VOIP domain error. The user's media failed to start.
|
||||
*/
|
||||
VoipUserMediaFailed,
|
||||
}
|
||||
|
||||
enum class CryptoSDK {
|
||||
|
||||
/**
|
||||
* Legacy crypto backend specific to each platform.
|
||||
*/
|
||||
Legacy,
|
||||
|
||||
/**
|
||||
* Cross-platform crypto backend written in Rust.
|
||||
*/
|
||||
Rust,
|
||||
}
|
||||
|
||||
enum class CryptoModule {
|
||||
|
||||
/**
|
||||
|
@ -75,8 +169,15 @@ data class Error(
|
|||
return mutableMapOf<String, Any>().apply {
|
||||
context?.let { put("context", it) }
|
||||
cryptoModule?.let { put("cryptoModule", it.name) }
|
||||
cryptoSDK?.let { put("cryptoSDK", it.name) }
|
||||
put("domain", domain.name)
|
||||
eventLocalAgeMillis?.let { put("eventLocalAgeMillis", it) }
|
||||
isFederated?.let { put("isFederated", it) }
|
||||
isMatrixDotOrg?.let { put("isMatrixDotOrg", it) }
|
||||
put("name", name.name)
|
||||
timeToDecryptMillis?.let { put("timeToDecryptMillis", it) }
|
||||
userTrustsOwnIdentity?.let { put("userTrustsOwnIdentity", it) }
|
||||
wasVisibleToUser?.let { put("wasVisibleToUser", it) }
|
||||
}.takeIf { it.isNotEmpty() }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -85,11 +85,28 @@ data class Interaction(
|
|||
*/
|
||||
MobileRoomAddHome,
|
||||
|
||||
/**
|
||||
* User switched the favourite toggle on Room Details screen.
|
||||
*/
|
||||
MobileRoomFavouriteToggle,
|
||||
|
||||
/**
|
||||
* User tapped on Leave Room button on Room Details screen.
|
||||
*/
|
||||
MobileRoomLeave,
|
||||
|
||||
/**
|
||||
* User adjusted their favourite rooms using the context menu on a room
|
||||
* in the room list.
|
||||
*/
|
||||
MobileRoomListRoomContextMenuFavouriteToggle,
|
||||
|
||||
/**
|
||||
* User adjusted their unread rooms using the context menu on a room in
|
||||
* the room list.
|
||||
*/
|
||||
MobileRoomListRoomContextMenuUnreadToggle,
|
||||
|
||||
/**
|
||||
* User tapped on Threads button on Room screen.
|
||||
*/
|
||||
|
@ -306,6 +323,18 @@ data class Interaction(
|
|||
*/
|
||||
WebRoomListRoomTileContextMenuLeaveItem,
|
||||
|
||||
/**
|
||||
* User marked a message as read using the context menu on a room tile
|
||||
* in the room list in Element Web/Desktop.
|
||||
*/
|
||||
WebRoomListRoomTileContextMenuMarkRead,
|
||||
|
||||
/**
|
||||
* User marked a room as unread using the context menu on a room tile in
|
||||
* the room list in Element Web/Desktop.
|
||||
*/
|
||||
WebRoomListRoomTileContextMenuMarkUnread,
|
||||
|
||||
/**
|
||||
* User accessed room settings using the context menu on a room tile in
|
||||
* the room list in Element Web/Desktop.
|
||||
|
@ -408,6 +437,18 @@ data class Interaction(
|
|||
*/
|
||||
WebThreadViewBackButton,
|
||||
|
||||
/**
|
||||
* User clicked on the Threads Activity Centre button of Element
|
||||
* Web/Desktop.
|
||||
*/
|
||||
WebThreadsActivityCentreButton,
|
||||
|
||||
/**
|
||||
* User clicked on a room in the Threads Activity Centre of Element
|
||||
* Web/Desktop.
|
||||
*/
|
||||
WebThreadsActivityCentreRoomItem,
|
||||
|
||||
/**
|
||||
* User selected a thread in the Threads panel in Element Web/Desktop.
|
||||
*/
|
||||
|
|
|
@ -119,6 +119,12 @@ data class MobileScreen(
|
|||
*/
|
||||
MyGroups,
|
||||
|
||||
/**
|
||||
* The screen containing tests to help user to fix issues around
|
||||
* notifications.
|
||||
*/
|
||||
NotificationTroubleshoot,
|
||||
|
||||
/**
|
||||
* The People tab on mobile that lists all the DM rooms you have joined.
|
||||
*/
|
||||
|
|
|
@ -0,0 +1,41 @@
|
|||
/*
|
||||
* Copyright (c) 2021 New Vector Ltd
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package im.vector.app.features.analytics.plan
|
||||
|
||||
import im.vector.app.features.analytics.itf.VectorAnalyticsEvent
|
||||
|
||||
// GENERATED FILE, DO NOT EDIT. FOR MORE INFORMATION VISIT
|
||||
// https://github.com/matrix-org/matrix-analytics-events/
|
||||
|
||||
/**
|
||||
* Triggered when the user runs the troubleshoot notification test suite.
|
||||
*/
|
||||
data class NotificationTroubleshoot(
|
||||
/**
|
||||
* Whether one or more tests are in error.
|
||||
*/
|
||||
val hasError: Boolean,
|
||||
) : VectorAnalyticsEvent {
|
||||
|
||||
override fun getName() = "NotificationTroubleshoot"
|
||||
|
||||
override fun getProperties(): Map<String, Any>? {
|
||||
return mutableMapOf<String, Any>().apply {
|
||||
put("hasError", hasError)
|
||||
}.takeIf { it.isNotEmpty() }
|
||||
}
|
||||
}
|
|
@ -27,7 +27,7 @@ import im.vector.app.features.analytics.itf.VectorAnalyticsEvent
|
|||
data class PollEnd(
|
||||
/**
|
||||
* Do not use this. Remove this property when the kotlin type generator
|
||||
* can properly generate types without proprties other than the event
|
||||
* can properly generate types without properties other than the event
|
||||
* name.
|
||||
*/
|
||||
val doNotUse: Boolean? = null,
|
||||
|
|
|
@ -27,7 +27,7 @@ import im.vector.app.features.analytics.itf.VectorAnalyticsEvent
|
|||
data class PollVote(
|
||||
/**
|
||||
* Do not use this. Remove this property when the kotlin type generator
|
||||
* can properly generate types without proprties other than the event
|
||||
* can properly generate types without properties other than the event
|
||||
* name.
|
||||
*/
|
||||
val doNotUse: Boolean? = null,
|
||||
|
|
|
@ -0,0 +1,137 @@
|
|||
/*
|
||||
* Copyright (c) 2021 New Vector Ltd
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package im.vector.app.features.analytics.plan
|
||||
|
||||
import im.vector.app.features.analytics.itf.VectorAnalyticsEvent
|
||||
|
||||
// GENERATED FILE, DO NOT EDIT. FOR MORE INFORMATION VISIT
|
||||
// https://github.com/matrix-org/matrix-analytics-events/
|
||||
|
||||
/**
|
||||
* Triggered when a moderation action is performed within a room.
|
||||
*/
|
||||
data class RoomModeration(
|
||||
/**
|
||||
* The action that was performed.
|
||||
*/
|
||||
val action: Action,
|
||||
/**
|
||||
* When the action sets a particular power level, this is the suggested
|
||||
* role for that the power level.
|
||||
*/
|
||||
val role: Role? = null,
|
||||
) : VectorAnalyticsEvent {
|
||||
|
||||
enum class Action {
|
||||
/**
|
||||
* Banned a room member.
|
||||
*/
|
||||
BanMember,
|
||||
|
||||
/**
|
||||
* Changed a room member's power level.
|
||||
*/
|
||||
ChangeMemberRole,
|
||||
|
||||
/**
|
||||
* Changed the power level required to ban room members.
|
||||
*/
|
||||
ChangePermissionsBanMembers,
|
||||
|
||||
/**
|
||||
* Changed the power level required to invite users to the room.
|
||||
*/
|
||||
ChangePermissionsInviteUsers,
|
||||
|
||||
/**
|
||||
* Changed the power level required to kick room members.
|
||||
*/
|
||||
ChangePermissionsKickMembers,
|
||||
|
||||
/**
|
||||
* Changed the power level required to redact messages in the room.
|
||||
*/
|
||||
ChangePermissionsRedactMessages,
|
||||
|
||||
/**
|
||||
* Changed the power level required to set the room's avatar.
|
||||
*/
|
||||
ChangePermissionsRoomAvatar,
|
||||
|
||||
/**
|
||||
* Changed the power level required to set the room's name.
|
||||
*/
|
||||
ChangePermissionsRoomName,
|
||||
|
||||
/**
|
||||
* Changed the power level required to set the room's topic.
|
||||
*/
|
||||
ChangePermissionsRoomTopic,
|
||||
|
||||
/**
|
||||
* Changed the power level required to send messages in the room.
|
||||
*/
|
||||
ChangePermissionsSendMessages,
|
||||
|
||||
/**
|
||||
* Kicked a room member.
|
||||
*/
|
||||
KickMember,
|
||||
|
||||
/**
|
||||
* Reset all of the room permissions back to their default values.
|
||||
*/
|
||||
ResetPermissions,
|
||||
|
||||
/**
|
||||
* Unbanned a room member.
|
||||
*/
|
||||
UnbanMember,
|
||||
}
|
||||
|
||||
enum class Role {
|
||||
|
||||
/**
|
||||
* A power level of 100.
|
||||
*/
|
||||
Administrator,
|
||||
|
||||
/**
|
||||
* A power level of 50.
|
||||
*/
|
||||
Moderator,
|
||||
|
||||
/**
|
||||
* Any other power level.
|
||||
*/
|
||||
Other,
|
||||
|
||||
/**
|
||||
* A power level of 0.
|
||||
*/
|
||||
User,
|
||||
}
|
||||
|
||||
override fun getName() = "RoomModeration"
|
||||
|
||||
override fun getProperties(): Map<String, Any>? {
|
||||
return mutableMapOf<String, Any>().apply {
|
||||
put("action", action.name)
|
||||
role?.let { put("role", it.name) }
|
||||
}.takeIf { it.isNotEmpty() }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
/*
|
||||
* Copyright (c) 2021 New Vector Ltd
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package im.vector.app.features.analytics.plan
|
||||
|
||||
// GENERATED FILE, DO NOT EDIT. FOR MORE INFORMATION VISIT
|
||||
// https://github.com/matrix-org/matrix-analytics-events/
|
||||
|
||||
/**
|
||||
* Super Properties are properties associated with events that are sent with
|
||||
* every capture call, be it a $pageview, an autocaptured button click, or
|
||||
* anything else.
|
||||
*/
|
||||
data class SuperProperties(
|
||||
/**
|
||||
* Used by web to identify the platform (Web Platform/Electron Platform).
|
||||
*/
|
||||
val appPlatform: String? = null,
|
||||
/**
|
||||
* Which crypto backend is the client currently using.
|
||||
*/
|
||||
val cryptoSDK: CryptoSDK? = null,
|
||||
/**
|
||||
* Version of the crypto backend.
|
||||
*/
|
||||
val cryptoSDKVersion: String? = null,
|
||||
) {
|
||||
|
||||
enum class CryptoSDK {
|
||||
/**
|
||||
* Legacy crypto backend specific to each platform.
|
||||
*/
|
||||
Legacy,
|
||||
|
||||
/**
|
||||
* Cross-platform crypto backend written in Rust.
|
||||
*/
|
||||
Rust,
|
||||
}
|
||||
|
||||
fun getProperties(): Map<String, Any>? {
|
||||
return mutableMapOf<String, Any>().apply {
|
||||
appPlatform?.let { put("appPlatform", it) }
|
||||
cryptoSDK?.let { put("cryptoSDK", it.name) }
|
||||
cryptoSDKVersion?.let { put("cryptoSDKVersion", it) }
|
||||
}.takeIf { it.isNotEmpty() }
|
||||
}
|
||||
}
|
|
@ -252,6 +252,12 @@ data class ViewRoom(
|
|||
*/
|
||||
WebSpacePanelNotificationBadge,
|
||||
|
||||
/**
|
||||
* Room accessed via interacting with the Threads Activity Centre in
|
||||
* Element Web/Desktop.
|
||||
*/
|
||||
WebThreadsActivityCentre,
|
||||
|
||||
/**
|
||||
* Room accessed via Element Web/Desktop's Unified Search modal.
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue