2021-03-05 02:35:15 +03:00
|
|
|
// SPDX-FileCopyrightText: 2021 Nheko Contributors
|
2022-01-01 06:57:53 +03:00
|
|
|
// SPDX-FileCopyrightText: 2022 Nheko Contributors
|
2021-03-07 07:57:56 +03:00
|
|
|
//
|
2021-03-05 02:35:15 +03:00
|
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
|
2021-01-12 17:03:39 +03:00
|
|
|
import QtQuick 2.6
|
2021-08-18 00:31:25 +03:00
|
|
|
import QtQuick.Controls 2.1
|
|
|
|
import QtQuick.Layouts 1.2
|
2019-11-30 03:43:39 +03:00
|
|
|
import im.nheko 1.0
|
2019-10-20 13:39:47 +03:00
|
|
|
|
2020-01-11 16:07:51 +03:00
|
|
|
Item {
|
2021-07-12 01:24:33 +03:00
|
|
|
id: d
|
|
|
|
|
|
|
|
required property bool isReply
|
2022-04-24 17:37:35 +03:00
|
|
|
property bool keepFullText: !isReply
|
2021-04-30 00:09:13 +03:00
|
|
|
property alias child: chooser.child
|
2022-02-09 23:36:04 +03:00
|
|
|
implicitWidth: (chooser.child && chooser.child.implicitWidth) ? chooser.child.implicitWidth : 0
|
2021-07-12 01:24:33 +03:00
|
|
|
required property double proportionalHeight
|
|
|
|
required property int type
|
|
|
|
required property string typeString
|
|
|
|
required property int originalWidth
|
2022-03-21 02:48:27 +03:00
|
|
|
required property int duration
|
2021-07-12 01:24:33 +03:00
|
|
|
required property string blurhash
|
|
|
|
required property string body
|
|
|
|
required property string formattedBody
|
|
|
|
required property string eventId
|
|
|
|
required property string filename
|
|
|
|
required property string filesize
|
|
|
|
required property string url
|
|
|
|
required property string thumbnailUrl
|
|
|
|
required property bool isOnlyEmoji
|
2022-02-07 23:00:51 +03:00
|
|
|
required property bool isStateEvent
|
2021-07-12 01:24:33 +03:00
|
|
|
required property string userId
|
|
|
|
required property string userName
|
2021-07-12 02:28:09 +03:00
|
|
|
required property string roomTopic
|
|
|
|
required property string roomName
|
|
|
|
required property string callType
|
2021-08-07 23:51:09 +03:00
|
|
|
required property int encryptionError
|
2021-07-20 15:09:19 +03:00
|
|
|
required property int relatedEventCacheBuster
|
2022-02-14 23:07:03 +03:00
|
|
|
property bool fitsMetadata: (chooser.child && chooser.child.fitsMetadata) ? chooser.child.fitsMetadata : false
|
|
|
|
property int metadataWidth
|
2020-10-08 22:11:21 +03:00
|
|
|
|
2022-02-12 00:02:30 +03:00
|
|
|
height: chooser.child ? chooser.child.height : Nheko.paddingLarge
|
2020-10-08 22:11:21 +03:00
|
|
|
|
|
|
|
DelegateChooser {
|
|
|
|
id: chooser
|
|
|
|
|
|
|
|
//role: "type" //< not supported in our custom implementation, have to use roleValue
|
2021-07-12 01:24:33 +03:00
|
|
|
roleValue: type
|
2022-02-03 22:26:20 +03:00
|
|
|
//anchors.fill: parent
|
|
|
|
|
2022-02-12 00:02:30 +03:00
|
|
|
width: parent.width? parent.width: 0 // this should get rid of "cannot read property 'width' of null"
|
2020-10-08 22:11:21 +03:00
|
|
|
|
|
|
|
DelegateChoice {
|
|
|
|
roleValue: MtxEvent.UnknownMessage
|
|
|
|
|
|
|
|
Placeholder {
|
2021-07-12 01:24:33 +03:00
|
|
|
typeString: d.typeString
|
2020-10-08 22:11:21 +03:00
|
|
|
text: "Unretrieved event"
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
DelegateChoice {
|
|
|
|
roleValue: MtxEvent.TextMessage
|
|
|
|
|
|
|
|
TextMessage {
|
2021-07-12 01:24:33 +03:00
|
|
|
formatted: d.formattedBody
|
|
|
|
body: d.body
|
|
|
|
isOnlyEmoji: d.isOnlyEmoji
|
|
|
|
isReply: d.isReply
|
2022-04-24 17:37:35 +03:00
|
|
|
keepFullText: d.keepFullText
|
2022-02-14 23:07:03 +03:00
|
|
|
metadataWidth: d.metadataWidth
|
2020-10-08 22:11:21 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
DelegateChoice {
|
|
|
|
roleValue: MtxEvent.NoticeMessage
|
|
|
|
|
|
|
|
NoticeMessage {
|
2021-07-12 01:24:33 +03:00
|
|
|
formatted: d.formattedBody
|
|
|
|
body: d.body
|
|
|
|
isOnlyEmoji: d.isOnlyEmoji
|
|
|
|
isReply: d.isReply
|
2022-04-24 17:37:35 +03:00
|
|
|
keepFullText: d.keepFullText
|
2022-02-07 23:00:51 +03:00
|
|
|
isStateEvent: d.isStateEvent
|
2022-02-14 23:59:35 +03:00
|
|
|
metadataWidth: d.metadataWidth
|
2020-10-08 22:11:21 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
DelegateChoice {
|
|
|
|
roleValue: MtxEvent.EmoteMessage
|
|
|
|
|
|
|
|
NoticeMessage {
|
2021-07-12 01:24:33 +03:00
|
|
|
formatted: TimelineManager.escapeEmoji(d.userName) + " " + d.formattedBody
|
2021-11-23 00:16:55 +03:00
|
|
|
color: TimelineManager.userColor(d.userId, Nheko.colors.base)
|
2021-07-12 01:24:33 +03:00
|
|
|
body: d.body
|
|
|
|
isOnlyEmoji: d.isOnlyEmoji
|
|
|
|
isReply: d.isReply
|
2022-04-24 17:37:35 +03:00
|
|
|
keepFullText: d.keepFullText
|
2022-02-07 23:00:51 +03:00
|
|
|
isStateEvent: d.isStateEvent
|
2022-02-14 23:59:35 +03:00
|
|
|
metadataWidth: d.metadataWidth
|
2020-10-08 22:11:21 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
DelegateChoice {
|
|
|
|
roleValue: MtxEvent.ImageMessage
|
|
|
|
|
|
|
|
ImageMessage {
|
2021-07-12 01:24:33 +03:00
|
|
|
type: d.type
|
|
|
|
originalWidth: d.originalWidth
|
|
|
|
proportionalHeight: d.proportionalHeight
|
|
|
|
url: d.url
|
|
|
|
blurhash: d.blurhash
|
|
|
|
body: d.body
|
|
|
|
filename: d.filename
|
|
|
|
isReply: d.isReply
|
2021-08-29 06:20:23 +03:00
|
|
|
eventId: d.eventId
|
2022-02-14 23:07:03 +03:00
|
|
|
metadataWidth: d.metadataWidth
|
2020-10-08 22:11:21 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
DelegateChoice {
|
|
|
|
roleValue: MtxEvent.Sticker
|
|
|
|
|
|
|
|
ImageMessage {
|
2021-07-12 01:24:33 +03:00
|
|
|
type: d.type
|
|
|
|
originalWidth: d.originalWidth
|
|
|
|
proportionalHeight: d.proportionalHeight
|
|
|
|
url: d.url
|
|
|
|
blurhash: d.blurhash
|
|
|
|
body: d.body
|
|
|
|
filename: d.filename
|
|
|
|
isReply: d.isReply
|
2021-08-29 06:20:23 +03:00
|
|
|
eventId: d.eventId
|
2022-02-14 23:07:03 +03:00
|
|
|
metadataWidth: d.metadataWidth
|
2020-10-08 22:11:21 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
DelegateChoice {
|
|
|
|
roleValue: MtxEvent.FileMessage
|
|
|
|
|
|
|
|
FileMessage {
|
2021-07-12 01:24:33 +03:00
|
|
|
eventId: d.eventId
|
|
|
|
filename: d.filename
|
|
|
|
filesize: d.filesize
|
2022-02-14 23:07:03 +03:00
|
|
|
metadataWidth: d.metadataWidth
|
2020-10-08 22:11:21 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
DelegateChoice {
|
|
|
|
roleValue: MtxEvent.VideoMessage
|
|
|
|
|
|
|
|
PlayableMediaMessage {
|
2021-07-12 01:24:33 +03:00
|
|
|
proportionalHeight: d.proportionalHeight
|
|
|
|
type: d.type
|
|
|
|
originalWidth: d.originalWidth
|
|
|
|
thumbnailUrl: d.thumbnailUrl
|
|
|
|
eventId: d.eventId
|
|
|
|
url: d.url
|
|
|
|
body: d.body
|
|
|
|
filesize: d.filesize
|
2022-03-21 02:48:27 +03:00
|
|
|
duration: d.duration
|
2022-02-14 23:07:03 +03:00
|
|
|
metadataWidth: d.metadataWidth
|
2020-10-08 22:11:21 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
DelegateChoice {
|
|
|
|
roleValue: MtxEvent.AudioMessage
|
|
|
|
|
|
|
|
PlayableMediaMessage {
|
2021-07-12 01:24:33 +03:00
|
|
|
proportionalHeight: d.proportionalHeight
|
|
|
|
type: d.type
|
|
|
|
originalWidth: d.originalWidth
|
|
|
|
thumbnailUrl: d.thumbnailUrl
|
|
|
|
eventId: d.eventId
|
|
|
|
url: d.url
|
|
|
|
body: d.body
|
|
|
|
filesize: d.filesize
|
2022-03-21 02:48:27 +03:00
|
|
|
duration: d.duration
|
2022-02-14 23:07:03 +03:00
|
|
|
metadataWidth: d.metadataWidth
|
2020-10-08 22:11:21 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
DelegateChoice {
|
|
|
|
roleValue: MtxEvent.Redacted
|
|
|
|
|
2021-11-29 03:59:57 +03:00
|
|
|
Redacted {
|
2022-02-14 23:07:03 +03:00
|
|
|
metadataWidth: d.metadataWidth
|
2020-10-08 22:11:21 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
DelegateChoice {
|
|
|
|
roleValue: MtxEvent.Redaction
|
|
|
|
|
|
|
|
Pill {
|
2022-02-07 23:53:37 +03:00
|
|
|
text: qsTr("%1 removed a message").arg(d.userName)
|
2022-02-07 23:00:51 +03:00
|
|
|
isStateEvent: d.isStateEvent
|
2020-10-08 22:11:21 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
DelegateChoice {
|
|
|
|
roleValue: MtxEvent.Encryption
|
|
|
|
|
|
|
|
Pill {
|
2022-02-07 23:53:37 +03:00
|
|
|
text: qsTr("%1 enabled encryption").arg(d.userName)
|
2022-02-07 23:00:51 +03:00
|
|
|
isStateEvent: d.isStateEvent
|
2020-10-08 22:11:21 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2021-08-07 23:51:09 +03:00
|
|
|
DelegateChoice {
|
|
|
|
roleValue: MtxEvent.Encrypted
|
|
|
|
|
|
|
|
Encrypted {
|
|
|
|
encryptionError: d.encryptionError
|
|
|
|
eventId: d.eventId
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2020-10-08 22:11:21 +03:00
|
|
|
DelegateChoice {
|
|
|
|
roleValue: MtxEvent.Name
|
|
|
|
|
|
|
|
NoticeMessage {
|
2021-07-12 01:24:33 +03:00
|
|
|
body: formatted
|
|
|
|
isOnlyEmoji: false
|
|
|
|
isReply: d.isReply
|
2022-04-24 17:37:35 +03:00
|
|
|
keepFullText: d.keepFullText
|
2022-02-07 23:00:51 +03:00
|
|
|
isStateEvent: d.isStateEvent
|
2022-02-07 23:53:37 +03:00
|
|
|
formatted: d.roomName ? qsTr("%2 changed the room name to: %1").arg(d.roomName).arg(d.userName) : qsTr("%1 removed the room name").arg(d.userName)
|
2020-10-08 22:11:21 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
DelegateChoice {
|
|
|
|
roleValue: MtxEvent.Topic
|
|
|
|
|
|
|
|
NoticeMessage {
|
2021-07-12 01:24:33 +03:00
|
|
|
body: formatted
|
|
|
|
isOnlyEmoji: false
|
|
|
|
isReply: d.isReply
|
2022-04-24 17:37:35 +03:00
|
|
|
keepFullText: d.keepFullText
|
2022-02-07 23:00:51 +03:00
|
|
|
isStateEvent: d.isStateEvent
|
2022-02-07 23:53:37 +03:00
|
|
|
formatted: d.roomTopic ? qsTr("%2 changed the topic to: %1").arg(d.roomTopic).arg(d.userName): qsTr("%1 removed the topic").arg(d.userName)
|
2020-10-08 22:11:21 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
DelegateChoice {
|
2021-06-19 22:11:58 +03:00
|
|
|
roleValue: MtxEvent.Avatar
|
|
|
|
|
|
|
|
NoticeMessage {
|
2021-07-12 01:24:33 +03:00
|
|
|
body: formatted
|
|
|
|
isOnlyEmoji: false
|
|
|
|
isReply: d.isReply
|
2022-04-24 17:37:35 +03:00
|
|
|
keepFullText: d.keepFullText
|
2022-02-07 23:00:51 +03:00
|
|
|
isStateEvent: d.isStateEvent
|
2021-07-12 01:24:33 +03:00
|
|
|
formatted: qsTr("%1 changed the room avatar").arg(d.userName)
|
2021-06-19 22:11:58 +03:00
|
|
|
}
|
2021-07-03 23:45:36 +03:00
|
|
|
|
2021-06-19 22:11:58 +03:00
|
|
|
}
|
|
|
|
|
2021-12-11 08:10:41 +03:00
|
|
|
DelegateChoice {
|
|
|
|
roleValue: MtxEvent.PinnedEvents
|
|
|
|
|
|
|
|
NoticeMessage {
|
|
|
|
body: formatted
|
|
|
|
isOnlyEmoji: false
|
|
|
|
isReply: d.isReply
|
2022-04-24 17:37:35 +03:00
|
|
|
keepFullText: d.keepFullText
|
2022-02-07 23:00:51 +03:00
|
|
|
isStateEvent: d.isStateEvent
|
2021-12-11 08:10:41 +03:00
|
|
|
formatted: qsTr("%1 changed the pinned messages.").arg(d.userName)
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
DelegateChoice {
|
|
|
|
roleValue: MtxEvent.ImagePackInRoom
|
|
|
|
|
|
|
|
NoticeMessage {
|
|
|
|
body: formatted
|
|
|
|
isOnlyEmoji: false
|
|
|
|
isReply: d.isReply
|
2022-04-24 17:37:35 +03:00
|
|
|
keepFullText: d.keepFullText
|
2022-02-07 23:00:51 +03:00
|
|
|
isStateEvent: d.isStateEvent
|
2022-04-19 23:33:53 +03:00
|
|
|
formatted: d.relatedEventCacheBuster, room.formatImagePackEvent(d.eventId)
|
2021-12-11 08:10:41 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2022-04-19 23:33:53 +03:00
|
|
|
|
2021-12-11 08:10:41 +03:00
|
|
|
DelegateChoice {
|
|
|
|
roleValue: MtxEvent.CanonicalAlias
|
|
|
|
|
|
|
|
NoticeMessage {
|
|
|
|
body: formatted
|
|
|
|
isOnlyEmoji: false
|
|
|
|
isReply: d.isReply
|
2022-04-24 17:37:35 +03:00
|
|
|
keepFullText: d.keepFullText
|
2022-02-07 23:00:51 +03:00
|
|
|
isStateEvent: d.isStateEvent
|
2021-12-11 08:10:41 +03:00
|
|
|
formatted: qsTr("%1 changed the addresses for this room.").arg(d.userName)
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
DelegateChoice {
|
|
|
|
roleValue: MtxEvent.SpaceParent
|
|
|
|
|
|
|
|
NoticeMessage {
|
|
|
|
body: formatted
|
|
|
|
isOnlyEmoji: false
|
|
|
|
isReply: d.isReply
|
2022-04-24 17:37:35 +03:00
|
|
|
keepFullText: d.keepFullText
|
2022-02-07 23:00:51 +03:00
|
|
|
isStateEvent: d.isStateEvent
|
2022-10-01 16:20:38 +03:00
|
|
|
formatted: qsTr("%1 changed the parent communities for this room.").arg(d.userName)
|
2021-12-11 08:10:41 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2021-06-19 22:11:58 +03:00
|
|
|
DelegateChoice {
|
2020-10-08 22:11:21 +03:00
|
|
|
roleValue: MtxEvent.RoomCreate
|
|
|
|
|
|
|
|
NoticeMessage {
|
2021-07-12 01:24:33 +03:00
|
|
|
body: formatted
|
|
|
|
isOnlyEmoji: false
|
|
|
|
isReply: d.isReply
|
2022-04-24 17:37:35 +03:00
|
|
|
keepFullText: d.keepFullText
|
2022-02-07 23:00:51 +03:00
|
|
|
isStateEvent: d.isStateEvent
|
2021-07-17 23:56:56 +03:00
|
|
|
formatted: qsTr("%1 created and configured room: %2").arg(d.userName).arg(room.roomId)
|
2020-10-08 22:11:21 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
DelegateChoice {
|
|
|
|
roleValue: MtxEvent.CallInvite
|
|
|
|
|
|
|
|
NoticeMessage {
|
2021-07-12 01:24:33 +03:00
|
|
|
body: formatted
|
|
|
|
isOnlyEmoji: false
|
|
|
|
isReply: d.isReply
|
2022-04-24 17:37:35 +03:00
|
|
|
keepFullText: d.keepFullText
|
2022-02-07 23:00:51 +03:00
|
|
|
isStateEvent: d.isStateEvent
|
2021-07-12 01:24:33 +03:00
|
|
|
formatted: {
|
2021-07-12 02:28:09 +03:00
|
|
|
switch (d.callType) {
|
2020-10-08 22:11:21 +03:00
|
|
|
case "voice":
|
2021-07-12 01:24:33 +03:00
|
|
|
return qsTr("%1 placed a voice call.").arg(d.userName);
|
2020-10-08 22:11:21 +03:00
|
|
|
case "video":
|
2021-07-12 01:24:33 +03:00
|
|
|
return qsTr("%1 placed a video call.").arg(d.userName);
|
2020-10-08 22:11:21 +03:00
|
|
|
default:
|
2021-07-12 01:24:33 +03:00
|
|
|
return qsTr("%1 placed a call.").arg(d.userName);
|
2020-10-08 22:11:21 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
DelegateChoice {
|
|
|
|
roleValue: MtxEvent.CallAnswer
|
|
|
|
|
|
|
|
NoticeMessage {
|
2021-07-12 01:24:33 +03:00
|
|
|
body: formatted
|
|
|
|
isOnlyEmoji: false
|
|
|
|
isReply: d.isReply
|
2022-04-24 17:37:35 +03:00
|
|
|
keepFullText: d.keepFullText
|
2022-02-07 23:00:51 +03:00
|
|
|
isStateEvent: d.isStateEvent
|
2021-07-12 01:24:33 +03:00
|
|
|
formatted: qsTr("%1 answered the call.").arg(d.userName)
|
2020-10-08 22:11:21 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2022-10-14 16:49:05 +03:00
|
|
|
DelegateChoice {
|
|
|
|
roleValue: MtxEvent.CallReject
|
|
|
|
|
|
|
|
NoticeMessage {
|
|
|
|
body: formatted
|
|
|
|
isOnlyEmoji: false
|
|
|
|
isReply: d.isReply
|
|
|
|
keepFullText: d.keepFullText
|
|
|
|
isStateEvent: d.isStateEvent
|
|
|
|
formatted: qsTr("%1 rejected the call.").arg(d.userName)
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
DelegateChoice {
|
|
|
|
roleValue: MtxEvent.CallSelectAnswer
|
|
|
|
|
|
|
|
NoticeMessage {
|
|
|
|
body: formatted
|
|
|
|
isOnlyEmoji: false
|
|
|
|
isReply: d.isReply
|
|
|
|
keepFullText: d.keepFullText
|
|
|
|
isStateEvent: d.isStateEvent
|
|
|
|
formatted: qsTr("%1 select answer").arg(d.userName)
|
|
|
|
// formatted: qsTr("Call answered elsewhere")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-10-08 22:11:21 +03:00
|
|
|
DelegateChoice {
|
|
|
|
roleValue: MtxEvent.CallHangUp
|
|
|
|
|
|
|
|
NoticeMessage {
|
2021-07-12 01:24:33 +03:00
|
|
|
body: formatted
|
|
|
|
isOnlyEmoji: false
|
|
|
|
isReply: d.isReply
|
2022-04-24 17:37:35 +03:00
|
|
|
keepFullText: d.keepFullText
|
2022-02-07 23:00:51 +03:00
|
|
|
isStateEvent: d.isStateEvent
|
2021-07-12 01:24:33 +03:00
|
|
|
formatted: qsTr("%1 ended the call.").arg(d.userName)
|
2020-10-08 22:11:21 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
DelegateChoice {
|
|
|
|
roleValue: MtxEvent.CallCandidates
|
|
|
|
|
|
|
|
NoticeMessage {
|
2021-07-12 01:24:33 +03:00
|
|
|
body: formatted
|
|
|
|
isOnlyEmoji: false
|
|
|
|
isReply: d.isReply
|
2022-04-24 17:37:35 +03:00
|
|
|
keepFullText: d.keepFullText
|
2022-02-07 23:00:51 +03:00
|
|
|
isStateEvent: d.isStateEvent
|
2022-02-09 23:36:04 +03:00
|
|
|
formatted: qsTr("%1 is negotiating the call...").arg(d.userName)
|
2020-10-08 22:11:21 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2022-10-14 16:49:05 +03:00
|
|
|
DelegateChoice {
|
|
|
|
roleValue: MtxEvent.CallNegotiate
|
|
|
|
|
|
|
|
NoticeMessage {
|
|
|
|
body: formatted
|
|
|
|
isOnlyEmoji: false
|
|
|
|
isReply: d.isReply
|
|
|
|
keepFullText: d.keepFullText
|
|
|
|
isStateEvent: d.isStateEvent
|
|
|
|
formatted: qsTr("%1 is negotiating the call...").arg(d.userName)
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2020-10-08 22:11:21 +03:00
|
|
|
DelegateChoice {
|
|
|
|
roleValue: MtxEvent.PowerLevels
|
|
|
|
|
|
|
|
NoticeMessage {
|
2021-07-12 01:24:33 +03:00
|
|
|
body: formatted
|
|
|
|
isOnlyEmoji: false
|
|
|
|
isReply: d.isReply
|
2022-04-24 17:37:35 +03:00
|
|
|
keepFullText: d.keepFullText
|
2022-02-07 23:00:51 +03:00
|
|
|
isStateEvent: d.isStateEvent
|
2021-07-20 15:09:19 +03:00
|
|
|
formatted: d.relatedEventCacheBuster, room.formatPowerLevelEvent(d.eventId)
|
2020-10-08 22:11:21 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2022-07-09 16:36:15 +03:00
|
|
|
DelegateChoice {
|
|
|
|
roleValue: MtxEvent.PolicyRuleUser
|
|
|
|
|
|
|
|
NoticeMessage {
|
|
|
|
body: formatted
|
|
|
|
isOnlyEmoji: false
|
|
|
|
isReply: d.isReply
|
|
|
|
keepFullText: d.keepFullText
|
|
|
|
isStateEvent: d.isStateEvent
|
|
|
|
formatted: d.relatedEventCacheBuster, room.formatPolicyRule(d.eventId)
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
DelegateChoice {
|
|
|
|
roleValue: MtxEvent.PolicyRuleRoom
|
|
|
|
|
|
|
|
NoticeMessage {
|
|
|
|
body: formatted
|
|
|
|
isOnlyEmoji: false
|
|
|
|
isReply: d.isReply
|
|
|
|
keepFullText: d.keepFullText
|
|
|
|
isStateEvent: d.isStateEvent
|
|
|
|
formatted: d.relatedEventCacheBuster, room.formatPolicyRule(d.eventId)
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
DelegateChoice {
|
|
|
|
roleValue: MtxEvent.PolicyRuleServer
|
|
|
|
|
|
|
|
NoticeMessage {
|
|
|
|
body: formatted
|
|
|
|
isOnlyEmoji: false
|
|
|
|
isReply: d.isReply
|
|
|
|
keepFullText: d.keepFullText
|
|
|
|
isStateEvent: d.isStateEvent
|
|
|
|
formatted: d.relatedEventCacheBuster, room.formatPolicyRule(d.eventId)
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2020-10-08 22:11:21 +03:00
|
|
|
DelegateChoice {
|
|
|
|
roleValue: MtxEvent.RoomJoinRules
|
|
|
|
|
|
|
|
NoticeMessage {
|
2021-07-12 01:24:33 +03:00
|
|
|
body: formatted
|
|
|
|
isOnlyEmoji: false
|
|
|
|
isReply: d.isReply
|
2022-04-24 17:37:35 +03:00
|
|
|
keepFullText: d.keepFullText
|
2022-02-07 23:00:51 +03:00
|
|
|
isStateEvent: d.isStateEvent
|
2021-07-20 15:09:19 +03:00
|
|
|
formatted: d.relatedEventCacheBuster, room.formatJoinRuleEvent(d.eventId)
|
2020-10-08 22:11:21 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
DelegateChoice {
|
|
|
|
roleValue: MtxEvent.RoomHistoryVisibility
|
|
|
|
|
|
|
|
NoticeMessage {
|
2021-07-12 01:24:33 +03:00
|
|
|
body: formatted
|
|
|
|
isOnlyEmoji: false
|
|
|
|
isReply: d.isReply
|
2022-04-24 17:37:35 +03:00
|
|
|
keepFullText: d.keepFullText
|
2022-02-07 23:00:51 +03:00
|
|
|
isStateEvent: d.isStateEvent
|
2021-07-20 15:09:19 +03:00
|
|
|
formatted: d.relatedEventCacheBuster, room.formatHistoryVisibilityEvent(d.eventId)
|
2020-10-08 22:11:21 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
DelegateChoice {
|
|
|
|
roleValue: MtxEvent.RoomGuestAccess
|
|
|
|
|
|
|
|
NoticeMessage {
|
2021-07-12 01:24:33 +03:00
|
|
|
body: formatted
|
|
|
|
isOnlyEmoji: false
|
|
|
|
isReply: d.isReply
|
2022-04-24 17:37:35 +03:00
|
|
|
keepFullText: d.keepFullText
|
2022-02-07 23:00:51 +03:00
|
|
|
isStateEvent: d.isStateEvent
|
2021-07-20 15:09:19 +03:00
|
|
|
formatted: d.relatedEventCacheBuster, room.formatGuestAccessEvent(d.eventId)
|
2020-10-08 22:11:21 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
DelegateChoice {
|
|
|
|
roleValue: MtxEvent.Member
|
|
|
|
|
2021-08-18 00:31:25 +03:00
|
|
|
ColumnLayout {
|
2021-12-30 21:32:28 +03:00
|
|
|
width: parent.width
|
2021-08-18 00:31:25 +03:00
|
|
|
|
|
|
|
NoticeMessage {
|
|
|
|
body: formatted
|
|
|
|
isOnlyEmoji: false
|
|
|
|
isReply: d.isReply
|
2022-04-24 17:37:35 +03:00
|
|
|
keepFullText: d.keepFullText
|
2022-02-07 23:00:51 +03:00
|
|
|
isStateEvent: d.isStateEvent
|
2021-12-30 15:45:24 +03:00
|
|
|
Layout.fillWidth: true
|
2021-08-18 00:31:25 +03:00
|
|
|
formatted: d.relatedEventCacheBuster, room.formatMemberEvent(d.eventId)
|
|
|
|
}
|
|
|
|
|
|
|
|
Button {
|
|
|
|
visible: d.relatedEventCacheBuster, room.showAcceptKnockButton(d.eventId)
|
|
|
|
palette: Nheko.colors
|
|
|
|
text: qsTr("Allow them in")
|
|
|
|
onClicked: room.acceptKnock(eventId)
|
|
|
|
}
|
|
|
|
|
2020-10-08 22:11:21 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
DelegateChoice {
|
|
|
|
roleValue: MtxEvent.KeyVerificationRequest
|
|
|
|
|
|
|
|
NoticeMessage {
|
2021-07-12 01:24:33 +03:00
|
|
|
body: formatted
|
|
|
|
isOnlyEmoji: false
|
|
|
|
isReply: d.isReply
|
2022-04-24 17:37:35 +03:00
|
|
|
keepFullText: d.keepFullText
|
2022-02-07 23:00:51 +03:00
|
|
|
isStateEvent: d.isStateEvent
|
2021-07-12 01:24:33 +03:00
|
|
|
formatted: "KeyVerificationRequest"
|
2020-10-08 22:11:21 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
DelegateChoice {
|
|
|
|
roleValue: MtxEvent.KeyVerificationStart
|
|
|
|
|
|
|
|
NoticeMessage {
|
2021-07-12 01:24:33 +03:00
|
|
|
body: formatted
|
|
|
|
isOnlyEmoji: false
|
|
|
|
isReply: d.isReply
|
2022-04-24 17:37:35 +03:00
|
|
|
keepFullText: d.keepFullText
|
2022-02-07 23:00:51 +03:00
|
|
|
isStateEvent: d.isStateEvent
|
2021-07-12 01:24:33 +03:00
|
|
|
formatted: "KeyVerificationStart"
|
2020-10-08 22:11:21 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
DelegateChoice {
|
|
|
|
roleValue: MtxEvent.KeyVerificationReady
|
|
|
|
|
|
|
|
NoticeMessage {
|
2021-07-12 01:24:33 +03:00
|
|
|
body: formatted
|
|
|
|
isOnlyEmoji: false
|
|
|
|
isReply: d.isReply
|
2022-04-24 17:37:35 +03:00
|
|
|
keepFullText: d.keepFullText
|
2022-02-07 23:00:51 +03:00
|
|
|
isStateEvent: d.isStateEvent
|
2021-07-12 01:24:33 +03:00
|
|
|
formatted: "KeyVerificationReady"
|
2020-10-08 22:11:21 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
DelegateChoice {
|
|
|
|
roleValue: MtxEvent.KeyVerificationCancel
|
|
|
|
|
|
|
|
NoticeMessage {
|
2021-07-12 01:24:33 +03:00
|
|
|
body: formatted
|
|
|
|
isOnlyEmoji: false
|
|
|
|
isReply: d.isReply
|
2022-04-24 17:37:35 +03:00
|
|
|
keepFullText: d.keepFullText
|
2022-02-07 23:00:51 +03:00
|
|
|
isStateEvent: d.isStateEvent
|
2021-07-12 01:24:33 +03:00
|
|
|
formatted: "KeyVerificationCancel"
|
2020-10-08 22:11:21 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
DelegateChoice {
|
|
|
|
roleValue: MtxEvent.KeyVerificationKey
|
|
|
|
|
|
|
|
NoticeMessage {
|
2021-07-12 01:24:33 +03:00
|
|
|
body: formatted
|
|
|
|
isOnlyEmoji: false
|
|
|
|
isReply: d.isReply
|
2022-04-24 17:37:35 +03:00
|
|
|
keepFullText: d.keepFullText
|
2022-02-07 23:00:51 +03:00
|
|
|
isStateEvent: d.isStateEvent
|
2021-07-12 01:24:33 +03:00
|
|
|
formatted: "KeyVerificationKey"
|
2020-10-08 22:11:21 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
DelegateChoice {
|
|
|
|
roleValue: MtxEvent.KeyVerificationMac
|
|
|
|
|
|
|
|
NoticeMessage {
|
2021-07-12 01:24:33 +03:00
|
|
|
body: formatted
|
|
|
|
isOnlyEmoji: false
|
|
|
|
isReply: d.isReply
|
2022-04-24 17:37:35 +03:00
|
|
|
keepFullText: d.keepFullText
|
2022-02-07 23:00:51 +03:00
|
|
|
isStateEvent: d.isStateEvent
|
2021-07-12 01:24:33 +03:00
|
|
|
formatted: "KeyVerificationMac"
|
2020-10-08 22:11:21 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
DelegateChoice {
|
|
|
|
roleValue: MtxEvent.KeyVerificationDone
|
|
|
|
|
|
|
|
NoticeMessage {
|
2021-07-12 01:24:33 +03:00
|
|
|
body: formatted
|
|
|
|
isOnlyEmoji: false
|
|
|
|
isReply: d.isReply
|
2022-04-24 17:37:35 +03:00
|
|
|
keepFullText: d.keepFullText
|
2022-02-07 23:00:51 +03:00
|
|
|
isStateEvent: d.isStateEvent
|
2021-07-12 01:24:33 +03:00
|
|
|
formatted: "KeyVerificationDone"
|
2020-10-08 22:11:21 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
DelegateChoice {
|
|
|
|
roleValue: MtxEvent.KeyVerificationDone
|
|
|
|
|
|
|
|
NoticeMessage {
|
2021-07-12 01:24:33 +03:00
|
|
|
body: formatted
|
|
|
|
isOnlyEmoji: false
|
|
|
|
isReply: d.isReply
|
2022-04-24 17:37:35 +03:00
|
|
|
keepFullText: d.keepFullText
|
2022-02-07 23:00:51 +03:00
|
|
|
isStateEvent: d.isStateEvent
|
2021-07-12 01:24:33 +03:00
|
|
|
formatted: "KeyVerificationDone"
|
2020-10-08 22:11:21 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
DelegateChoice {
|
|
|
|
roleValue: MtxEvent.KeyVerificationAccept
|
|
|
|
|
|
|
|
NoticeMessage {
|
2021-07-12 01:24:33 +03:00
|
|
|
body: formatted
|
|
|
|
isOnlyEmoji: false
|
|
|
|
isReply: d.isReply
|
2022-04-24 17:37:35 +03:00
|
|
|
keepFullText: d.keepFullText
|
2022-02-07 23:00:51 +03:00
|
|
|
isStateEvent: d.isStateEvent
|
2021-07-12 01:24:33 +03:00
|
|
|
formatted: "KeyVerificationAccept"
|
2020-10-08 22:11:21 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
DelegateChoice {
|
|
|
|
Placeholder {
|
2021-07-12 01:24:33 +03:00
|
|
|
typeString: d.typeString
|
2020-10-08 22:11:21 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2019-10-20 13:39:47 +03:00
|
|
|
}
|