Compare commits
29 Commits
release/25
...
1.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4b0cefe7ff | ||
|
|
60e9587aa7 | ||
|
|
ae2c517940 | ||
|
|
ac38b42403 | ||
|
|
06803548fa | ||
|
|
70dba75d31 | ||
|
|
aad95d2bc3 | ||
|
|
d57b410c04 | ||
|
|
e24a1b4541 | ||
|
|
008ef38226 | ||
|
|
cae3c4ca60 | ||
|
|
71c4d7d651 | ||
|
|
d8edac696d | ||
|
|
a5570838ca | ||
|
|
2d75c34b17 | ||
|
|
cc372f67eb | ||
|
|
aaa042a2f0 | ||
|
|
6fdc8a9298 | ||
|
|
1526c81a2f | ||
|
|
03d13bb543 | ||
|
|
d8916aa133 | ||
|
|
bb3b3bc088 | ||
|
|
1234132a05 | ||
|
|
52e5ec50c6 | ||
|
|
16f661f6ae | ||
|
|
df1835de2d | ||
|
|
1432ba2368 | ||
|
|
edcbc9ab01 | ||
|
|
1afbd42523 |
@@ -28,7 +28,7 @@ endif()
|
||||
# Fix a crash due to problems with quotient's event system. Can probably be removed once the reworked event system is in
|
||||
cmake_policy(SET CMP0063 OLD)
|
||||
|
||||
ecm_setup_version(1.0.80
|
||||
ecm_setup_version(1.1.1
|
||||
VARIABLE_PREFIX NEOCHAT
|
||||
VERSION_HEADER ${CMAKE_CURRENT_BINARY_DIR}/neochat-version.h
|
||||
)
|
||||
|
||||
@@ -318,6 +318,11 @@ ToolBar {
|
||||
property real progress: 0
|
||||
property bool autoAppeared: false
|
||||
|
||||
// store each user we autoComplete here, this will be helpful later to generate
|
||||
// the matrix.to links.
|
||||
// This use an hack to define: https://doc.qt.io/qt-5/qml-var.html#property-value-initialization-semantics
|
||||
property var userAutocompleted: ({})
|
||||
|
||||
ChatDocumentHandler {
|
||||
id: documentHandler
|
||||
document: inputField.textDocument
|
||||
@@ -469,11 +474,6 @@ ToolBar {
|
||||
autoCompleteEndPosition = cursorPosition
|
||||
}
|
||||
|
||||
// store each user we autoComplete here, this will be helpful later to generate
|
||||
// the matrix.to links.
|
||||
// This use an hack to define: https://doc.qt.io/qt-5/qml-var.html#property-value-initialization-semantics
|
||||
property var userAutocompleted: ({})
|
||||
|
||||
function postMessage() {
|
||||
roomManager.actionsHandler.postMessage(inputField.text.trim(), attachmentPath,
|
||||
replyEventID, editEventId, inputField.userAutocompleted);
|
||||
@@ -487,10 +487,10 @@ ToolBar {
|
||||
|
||||
function autoComplete() {
|
||||
documentHandler.replaceAutoComplete(autoCompleteListView.currentItem.displayText)
|
||||
// Unfortunally it doesn't
|
||||
if (!autoCompleteListView.currentItem.isEmoji) {
|
||||
inputField.userAutocompleted[autoCompleteListView.currentItem.displayText] = autoCompleteListView.currentItem.userId;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -582,16 +582,14 @@ ToolBar {
|
||||
}
|
||||
|
||||
function clear() {
|
||||
inputField.clear()
|
||||
inputField.clear();
|
||||
inputField.userAutocompleted = {};
|
||||
}
|
||||
|
||||
function clearEditReply() {
|
||||
isReply = false;
|
||||
replyUser = null;
|
||||
if (root.editEventId.length > 0) {
|
||||
clear();
|
||||
}
|
||||
clear();
|
||||
root.replyContent = "";
|
||||
root.replyEventID = "";
|
||||
root.editEventId = "";
|
||||
@@ -602,9 +600,26 @@ ToolBar {
|
||||
inputField.forceActiveFocus()
|
||||
}
|
||||
|
||||
function edit(editContent, editEventId) {
|
||||
function edit(editContent, editFormatedContent, editEventId) {
|
||||
console.log("Editing ", editContent, "html:", editFormatedContent)
|
||||
// Set the input field in edit mode
|
||||
inputField.text = editContent;
|
||||
root.editEventId = editEventId
|
||||
|
||||
// clean autocompletion list
|
||||
inputField.userAutocompleted = {};
|
||||
|
||||
// Fill autocompletion list with values extracted from message.
|
||||
// We can't just iterate on every user in the list and try to
|
||||
// find matching display name since some users have display name
|
||||
// matching frequent words and this will marks too many words as
|
||||
// mentions.
|
||||
const regex = /<a href=\"https:\/\/matrix.to\/#\/(@[a-zA-Z09]*:[a-zA-Z09.]*)\">([^<]*)<\/a>/g;
|
||||
|
||||
let match;
|
||||
while ((match = regex.exec(editFormatedContent.toString())) !== null) {
|
||||
inputField.userAutocompleted[match[2]] = match[1];
|
||||
}
|
||||
}
|
||||
|
||||
function closeAll() {
|
||||
|
||||
@@ -139,7 +139,7 @@ RowLayout {
|
||||
QQC2.ToolTip.visible: hovered
|
||||
visible: controlContainer.hovered && author.id === Controller.activeConnection.localUserId && (model.eventType === "emote" || model.eventType === "message")
|
||||
icon.name: "document-edit"
|
||||
onClicked: chatTextInput.edit(message, eventId)
|
||||
onClicked: chatTextInput.edit(message, model.formattedBody, eventId)
|
||||
}
|
||||
QQC2.Button {
|
||||
QQC2.ToolTip.text: i18n("Reply")
|
||||
|
||||
@@ -8,7 +8,6 @@ import QtQuick 2.10
|
||||
import QtQuick.Controls 2.1 as QQC2
|
||||
import QtQuick.Layouts 1.12
|
||||
import org.kde.kirigami 2.12 as Kirigami
|
||||
import QtQuick.Dialogs 1.2
|
||||
import org.kde.kquickimageeditor 1.0 as KQuickImageEditor
|
||||
import QtGraphicalEffects 1.12
|
||||
import Qt.labs.platform 1.0 as Platform
|
||||
@@ -81,21 +80,6 @@ Kirigami.Page {
|
||||
onActivated: saveAsAction.trigger();
|
||||
} anchors.fill: parent
|
||||
|
||||
FileDialog {
|
||||
id: fileDialog
|
||||
title: i18n("Save As")
|
||||
folder: shortcuts.home
|
||||
selectMultiple: false
|
||||
selectExisting: false
|
||||
onAccepted: {
|
||||
fileDialog.close()
|
||||
}
|
||||
onRejected: {
|
||||
fileDialog.close()
|
||||
}
|
||||
Component.onCompleted: visible = false
|
||||
}
|
||||
|
||||
KQuickImageEditor.ImageDocument {
|
||||
id: imageDoc
|
||||
path: rootEditorView.imagePath
|
||||
|
||||
@@ -111,8 +111,8 @@ Kirigami.ScrollablePage {
|
||||
}
|
||||
contentItem: RowLayout {
|
||||
Kirigami.Avatar {
|
||||
Layout.preferredWidth: Kirigami.Units.iconSizes.huge
|
||||
Layout.preferredHeight: Kirigami.Units.iconSizes.huge
|
||||
Layout.preferredWidth: Kirigami.Units.iconSizes.normal
|
||||
Layout.preferredHeight: Kirigami.Units.iconSizes.normal
|
||||
|
||||
source: model.avatar ? ("image://mxc/" + model.avatar) : ""
|
||||
name: name
|
||||
|
||||
@@ -187,7 +187,7 @@ Kirigami.ScrollablePage {
|
||||
onClicked: {
|
||||
attachDialog.close()
|
||||
|
||||
var fileDialog = openFileDialog.createObject(ApplicationWindow.overlay)
|
||||
var fileDialog = openFileDialog.createObject(QQC2.ApplicationWindow.overlay)
|
||||
|
||||
fileDialog.chosen.connect(function(path) {
|
||||
if (!path) return
|
||||
|
||||
@@ -17,7 +17,7 @@ Kirigami.ScrollablePage {
|
||||
|
||||
Kirigami.FormLayout {
|
||||
QQC2.CheckBox {
|
||||
Kirigami.FormData.label: i18nc("General settings:")
|
||||
Kirigami.FormData.label: i18n("General settings:")
|
||||
text: i18n("Close to system tray")
|
||||
checked: Config.systemTray
|
||||
onToggled: {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
[Global]
|
||||
IconName=org.kde.neochat
|
||||
Name=Neochat
|
||||
Name[az]=Neochat
|
||||
Name[ca]=Neochat
|
||||
Name[ca@valencia]=Neochat
|
||||
Name[cs]=Neochat
|
||||
Name[da]=Neochat
|
||||
Name[de]=Neochat
|
||||
Name[en_GB]=Neochat
|
||||
@@ -12,13 +12,14 @@ Name[eu]=Neochat
|
||||
Name[fi]=Neochat
|
||||
Name[fr]=Neochat
|
||||
Name[hu]=Neochat
|
||||
Name[ia]=Neochat
|
||||
Name[it]=Neochat
|
||||
Name[nl]=Neochat
|
||||
Name[nn]=Neochat
|
||||
Name[pa]=ਨਿਓ-ਚੈਟ
|
||||
Name[pl]=Neochat
|
||||
Name[pt]=Neochat
|
||||
Name[pt_BR]=Neochat
|
||||
Name[ro]=Neochat
|
||||
Name[sk]=Neochat
|
||||
Name[sl]=Neochat
|
||||
Name[sv]=Neochat
|
||||
@@ -27,33 +28,33 @@ Name[x-test]=xxNeochatxx
|
||||
Name[zh_CN]=Neochat
|
||||
DesktopEntry=org.kde.neochat
|
||||
Comment=A client for matrix, the decentralized communication protocol
|
||||
Comment[az]=Matrix üçün müştəri, mərkəzləşməmiş kommunikasiya protokolu
|
||||
Comment[ca]=Un client per al Matrix, el protocol de comunicacions descentralitzat
|
||||
Comment[ca@valencia]=Un client per al Matrix, el protocol de comunicacions descentralitzat
|
||||
Comment[de]=Ein Programm für Matrix, das dezentrale Kommunikationsprotokoll
|
||||
Comment[en_GB]=A client for matrix, the decentralised communication protocol
|
||||
Comment[es]=Un cliente para Matrix, el protocolo de comunicaciones descentralizado
|
||||
Comment[eu]=Matrix, deszentralizatutako komunikazio protokolorako, bezero bat
|
||||
Comment[fi]=Hajautetun Matrix-viestintäyhteyskäytännön asiakasohjelma
|
||||
Comment[hu]=Kliens a matrixhoz, a decentralizált kommunikációs protokollhoz
|
||||
Comment[fr]=Un client pour « Matrix », le protocole décentralisé de communications.
|
||||
Comment[ia]=Un cliente per matrix, le protocollo de communication decentralisate
|
||||
Comment[it]=Un client per matrix, il protocollo di comunicazione decentralizzato
|
||||
Comment[nl]=Een client voor matrix, het gedecentraliseerde communicatieprotocol
|
||||
Comment[nn]=Klient for Matrix, den desentraliserte lynmeldingsprotokollen.
|
||||
Comment[pa]=ਮੈਟਰਿਕਸ, ਸਰਬ-ਸਾਂਝੇ ਸੰਚਾਰ ਪਰੋਟੋਕਾਲ, ਲਈ ਕਲਾਈਂਟ ਹੈ
|
||||
Comment[pl]=Program do obsługi matriksa, rozproszonego protokołu porozumiewania się
|
||||
Comment[pt]=Um cliente para o Matrix, o protocolo descentralizado de comunicações
|
||||
Comment[pt_BR]=Um cliente para o Matrix, o protocolo de comunicação decentralizado
|
||||
Comment[sk]=Klient pre matrix, decentralizovaný komunikačný protokol
|
||||
Comment[ro]=Client pentru Matrix, protocolul de comunicare descentralizată
|
||||
Comment[sl]=Odjemalec za decentralizirani komunikacijski protokol matrix
|
||||
Comment[sv]=En klient för matrix, det decentraliserade kommunikationsprotokollet
|
||||
Comment[uk]=Клієнт matrix, децентралізованого протоколу обміну даними
|
||||
Comment[x-test]=xxA client for matrix, the decentralized communication protocolxx
|
||||
Comment[zh_CN]=分布式通讯协议 Matrix 的客户端
|
||||
|
||||
|
||||
[Event/message]
|
||||
Name=New message
|
||||
Name[az]=Yeni ismarıc
|
||||
Name[ca]=Missatge nou
|
||||
Name[ca@valencia]=Missatge nou
|
||||
Name[cs]=Nová zpráva
|
||||
Name[de]=Neue Nachricht
|
||||
Name[en_GB]=New message
|
||||
Name[es]=Nuevo mensaje
|
||||
@@ -61,13 +62,14 @@ Name[eu]=Mezu berria
|
||||
Name[fi]=Uusi viesti
|
||||
Name[fr]=Nouveau message
|
||||
Name[hu]=Új üzenet
|
||||
Name[ia]=Nove message
|
||||
Name[it]=Nuovo messaggio
|
||||
Name[nl]=Nieuw bericht
|
||||
Name[nn]=Ny melding
|
||||
Name[pa]=ਨਵਾਂ ਸੁਨੇਹਾ
|
||||
Name[pl]=Nowa wiadomość
|
||||
Name[pt]=Nova mensagem
|
||||
Name[pt_BR]=Nova mensagem
|
||||
Name[ro]=Mesaj nou
|
||||
Name[sk]=Nová správa
|
||||
Name[sl]=Novo sporočilo
|
||||
Name[sv]=Nytt meddelande
|
||||
@@ -75,7 +77,6 @@ Name[uk]=Нове повідомлення
|
||||
Name[x-test]=xxNew messagexx
|
||||
Name[zh_CN]=新消息
|
||||
Comment=There is a new message
|
||||
Comment[az]=Yeni ismarıc var
|
||||
Comment[ca]=Hi ha un missatge nou
|
||||
Comment[ca@valencia]=Hi ha un missatge nou
|
||||
Comment[de]=Es ist eine neue Nachricht vorhanden
|
||||
@@ -85,13 +86,14 @@ Comment[eu]=Mezu berri bat dago
|
||||
Comment[fi]=Saapui uusi viesti
|
||||
Comment[fr]=Il y a un nouveau message
|
||||
Comment[hu]=Új üzenet érkezett
|
||||
Comment[ia]=Isto es un nove message
|
||||
Comment[it]=È presente un nuovo messaggio
|
||||
Comment[nl]=Er is een nieuw bericht
|
||||
Comment[nn]=Du har ei ny melding
|
||||
Comment[pa]=ਨਵਾਂ ਸੁਨੇਹਾ ਹੈ
|
||||
Comment[pl]=Dostępna jest nowa wiadomość
|
||||
Comment[pt]=Tem uma mensagem nova
|
||||
Comment[pt_BR]=Existe uma nova mensagem
|
||||
Comment[ro]=Este un mesaj nou
|
||||
Comment[sk]=Je nová správa
|
||||
Comment[sl]=Prišlo je novo sporočilo
|
||||
Comment[sv]=Det finns ett nytt meddelande
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
<binary>neochat</binary>
|
||||
</provides>
|
||||
<name>Neochat</name>
|
||||
<name xml:lang="az">Neochat</name>
|
||||
<name xml:lang="ca">Neochat</name>
|
||||
<name xml:lang="ca-valencia">Neochat</name>
|
||||
<name xml:lang="cs">Neochat</name>
|
||||
<name xml:lang="da">Neochat</name>
|
||||
<name xml:lang="de">Neochat</name>
|
||||
<name xml:lang="en-GB">Neochat</name>
|
||||
@@ -16,11 +16,11 @@
|
||||
<name xml:lang="fi">Neochat</name>
|
||||
<name xml:lang="fr">Neochat</name>
|
||||
<name xml:lang="hu">Neochat</name>
|
||||
<name xml:lang="ia">Neochat</name>
|
||||
<name xml:lang="id">Neochat</name>
|
||||
<name xml:lang="it">Neochat</name>
|
||||
<name xml:lang="nl">Neochat</name>
|
||||
<name xml:lang="nn">Neochat</name>
|
||||
<name xml:lang="pa">ਨਿਓ-ਚੈਟ</name>
|
||||
<name xml:lang="pl">Neochat</name>
|
||||
<name xml:lang="pt">Neochat</name>
|
||||
<name xml:lang="pt-BR">Neochat</name>
|
||||
@@ -30,9 +30,9 @@
|
||||
<name xml:lang="uk">Neochat</name>
|
||||
<name xml:lang="x-test">xxNeochatxx</name>
|
||||
<summary>A client for matrix, the decentralized communication protocol</summary>
|
||||
<summary xml:lang="az">Matrix üçün müştəri, mərkəzləşməmiş kommunikasiya protokolu</summary>
|
||||
<summary xml:lang="ca">Un client per al Matrix, el protocol de comunicacions descentralitzat</summary>
|
||||
<summary xml:lang="ca-valencia">Un client per al Matrix, el protocol de comunicacions descentralitzat</summary>
|
||||
<summary xml:lang="cs">Klient pro decentralizovaný komunikační protokol matrix</summary>
|
||||
<summary xml:lang="de">Ein Programm für Matrix, das dezentrale Kommunikationsprotokoll</summary>
|
||||
<summary xml:lang="en-GB">A client for matrix, the decentralised communication protocol</summary>
|
||||
<summary xml:lang="es">Un cliente para Matrix, el protocolo de comunicaciones descentralizado</summary>
|
||||
@@ -40,11 +40,11 @@
|
||||
<summary xml:lang="fi">Asiakas Matrixille, hajautetulle viestintäyhteyskäytännölle</summary>
|
||||
<summary xml:lang="fr">Un client pour « Matrix », le protocole décentralisé de communications.</summary>
|
||||
<summary xml:lang="hu">Kliens a matrixhoz, a decentralizált kommunikációs protokollhoz</summary>
|
||||
<summary xml:lang="ia">Un cliente per matrix, le protocollo de communication decentralisate</summary>
|
||||
<summary xml:lang="id">Klien untuk matrix, protokol komunikasi terdesentralisasi</summary>
|
||||
<summary xml:lang="it">Un client per matrix, il protocollo di comunicazione decentralizzato</summary>
|
||||
<summary xml:lang="nl">Een client voor matrix, het gedecentraliseerde communicatieprotocol</summary>
|
||||
<summary xml:lang="nn">Ein klient for Matrix, den desentraliserte lynmeldingsprotokollen</summary>
|
||||
<summary xml:lang="pa">ਮੈਟਰਿਕਸ, ਸਰਬ-ਸਾਂਝੇ ਸੰਚਾਰ ਪਰੋਟੋਕਾਲ, ਲਈ ਕਲਾਈਂਟ ਹੈ</summary>
|
||||
<summary xml:lang="pl">Program do obsługi matriksa, rozproszonego protokołu porozumiewania się</summary>
|
||||
<summary xml:lang="pt">Um cliente para o Matrix, o protocolo de comunicação descentralizado</summary>
|
||||
<summary xml:lang="pt-BR">Um cliente do Matrix, o protocolo de comunicação descentralizado</summary>
|
||||
@@ -55,9 +55,9 @@
|
||||
<summary xml:lang="x-test">xxA client for matrix, the decentralized communication protocolxx</summary>
|
||||
<description>
|
||||
<p>A client for matrix, the decentralized communication protocol.</p>
|
||||
<p xml:lang="az">Matrix üçün müştəri, mərkəzləşməmiş kommunikasiya protokolu.</p>
|
||||
<p xml:lang="ca">Un client per al Matrix, el protocol de comunicacions descentralitzat.</p>
|
||||
<p xml:lang="ca-valencia">Un client per al Matrix, el protocol de comunicacions descentralitzat.</p>
|
||||
<p xml:lang="cs">Klient pro decentralizovaný komunikační protokol matrix.</p>
|
||||
<p xml:lang="de">Ein Programm für Matrix, das dezentrale Kommunikationsprotokoll.</p>
|
||||
<p xml:lang="en-GB">A client for matrix, the decentralised communication protocol.</p>
|
||||
<p xml:lang="es">Un cliente para Matrix, el protocolo de comunicaciones descentralizado.</p>
|
||||
@@ -65,11 +65,11 @@
|
||||
<p xml:lang="fi">Asiakas Matrixille, hajautetulle viestintäyhteyskäytännölle.</p>
|
||||
<p xml:lang="fr">Un client « Matrix », le protocole décentralisé de communications.</p>
|
||||
<p xml:lang="hu">Kliens a matrixhoz, a decentralizált kommunikációs protokollhoz.</p>
|
||||
<p xml:lang="ia">Un cliente per matrix, le protocollo de communication decentralisate.</p>
|
||||
<p xml:lang="id">Klien untuk matrix, protokol komunikasi terdesentralisasi.</p>
|
||||
<p xml:lang="it">Un client per matrix, il protocollo di comunicazione decentralizzato.</p>
|
||||
<p xml:lang="nl">Een client voor matrix, het gedecentraliseerde communicatieprotocol.</p>
|
||||
<p xml:lang="nn">Ein klient for Matrix, den desentraliserte lynmeldingsprotokollen.</p>
|
||||
<p xml:lang="pa">ਮੈਟਰਿਕਸ, ਸਰਬ-ਸਾਂਝੇ ਸੰਚਾਰ ਪਰੋਟੋਕਾਲ, ਲਈ ਕਲਾਈਂਟ ਹੈ।</p>
|
||||
<p xml:lang="pl">Program do obsługi matriksa, rozproszonego protokołu porozumiewania się.</p>
|
||||
<p xml:lang="pt">Um cliente para o Matrix, o protocolo de comunicação descentralizado.</p>
|
||||
<p xml:lang="pt-BR">Um cliente do Matrix, o protocolo de comunicação descentralizado.</p>
|
||||
@@ -85,9 +85,9 @@
|
||||
<category>Network</category>
|
||||
</categories>
|
||||
<developer_name>The KDE Community</developer_name>
|
||||
<developer_name xml:lang="az">KDE Cəmiyyəti</developer_name>
|
||||
<developer_name xml:lang="ca">La comunitat KDE</developer_name>
|
||||
<developer_name xml:lang="ca-valencia">La comunitat KDE</developer_name>
|
||||
<developer_name xml:lang="cs">Komunita KDE</developer_name>
|
||||
<developer_name xml:lang="de">Die KDE-Gemeinschaft</developer_name>
|
||||
<developer_name xml:lang="en-GB">The KDE Community</developer_name>
|
||||
<developer_name xml:lang="es">La comunidad KDE</developer_name>
|
||||
@@ -95,6 +95,7 @@
|
||||
<developer_name xml:lang="fi">KDE-yhteisö</developer_name>
|
||||
<developer_name xml:lang="fr">La communauté de KDE</developer_name>
|
||||
<developer_name xml:lang="hu">A KDE Közösség</developer_name>
|
||||
<developer_name xml:lang="ia">Le communitate de KDE</developer_name>
|
||||
<developer_name xml:lang="id">Komunitas KDE</developer_name>
|
||||
<developer_name xml:lang="it">La comunità KDE</developer_name>
|
||||
<developer_name xml:lang="nl">De KDE gemeenschap</developer_name>
|
||||
@@ -112,13 +113,27 @@
|
||||
<value key="KDE::matrix">#neochat:kde.org</value>
|
||||
<screenshots>
|
||||
<screenshot type="default">
|
||||
<image>https://www.plasma-mobile.org/img/post-2020-10/post-2020-10-neochat-timeline.png</image>
|
||||
<image>https://cdn.kde.org/screenshots/neochat/application.png</image>
|
||||
</screenshot>
|
||||
<screenshot>
|
||||
<image>https://cdn.kde.org/screenshots/neochat/application-mobile.png</image>
|
||||
</screenshot>
|
||||
</screenshots>
|
||||
<content_rating type="oars-1.1">
|
||||
<content_attribute id="social-chat">intense</content_attribute>
|
||||
</content_rating>
|
||||
<releases>
|
||||
<release urgency="critical" version="1.1.1" date="2021-02-23"/>
|
||||
<release version="1.1.0" date="2021-02-22">
|
||||
<description>
|
||||
<p>Probably the highlight of this release is the completely new login page. It detects the server configuration based on your Matrix Id. This allows you to login to servers requiring Single Sign On (SSO) (like the Mozilla or the incoming Fedora Matrix instance).</p>
|
||||
<p>Servers that require agreeing to the TOS before usage are correctly detected now and redirect to their TOS webpage, allowing the user to agree to them instead of silently failing to load the account.</p>
|
||||
<p>It is now possible to open a room into a new window. This allows you to view and interact with multiple rooms at the same time.</p>
|
||||
<p>We added a few commands to NeoChat (/shrug, /lenny, /join, /ignore, ...).</p>
|
||||
<p>We improved the Plasma integration a bit. Now the number of unread messages is displayed in the Plasma Taskbar.</p>
|
||||
</description>
|
||||
<url>https://carlschwan.eu/2020/02/22/neochat-1.1/</url>
|
||||
</release>
|
||||
<release version="1.0.1" date="2021-01-13">
|
||||
<description>
|
||||
<p>This version fixes several bugs.</p>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
[Desktop Entry]
|
||||
Name=Neochat
|
||||
Name[az]=Neochat
|
||||
Name[ca]=Neochat
|
||||
Name[ca@valencia]=Neochat
|
||||
Name[cs]=Neochat
|
||||
Name[da]=Neochat
|
||||
Name[de]=Neochat
|
||||
Name[en_GB]=Neochat
|
||||
@@ -11,13 +11,14 @@ Name[eu]=Neochat
|
||||
Name[fi]=Neochat
|
||||
Name[fr]=Neochat
|
||||
Name[hu]=Neochat
|
||||
Name[ia]=Neochat
|
||||
Name[it]=Neochat
|
||||
Name[nl]=Neochat
|
||||
Name[nn]=Neochat
|
||||
Name[pa]=ਨਿਓ-ਚੈਟ
|
||||
Name[pl]=Neochat
|
||||
Name[pt]=Neochat
|
||||
Name[pt_BR]=Neochat
|
||||
Name[ro]=Neochat
|
||||
Name[sk]=Neochat
|
||||
Name[sl]=Neochat
|
||||
Name[sv]=Neochat
|
||||
@@ -25,9 +26,9 @@ Name[uk]=Neochat
|
||||
Name[x-test]=xxNeochatxx
|
||||
Name[zh_CN]=Neochat
|
||||
GenericName=Matrix Client
|
||||
GenericName[az]=Matrix Müştərisi
|
||||
GenericName[ca]=Client del Matrix
|
||||
GenericName[ca@valencia]=Client del Matrix
|
||||
GenericName[cs]=Klient protokolu Matrix
|
||||
GenericName[de]=Matrix-Programm
|
||||
GenericName[en_GB]=Matrix Client
|
||||
GenericName[es]=Cliente para Matrix
|
||||
@@ -35,13 +36,14 @@ GenericName[eu]=Matrix bezeroa
|
||||
GenericName[fi]=Matrix-asiakas
|
||||
GenericName[fr]=Client « Matrix »
|
||||
GenericName[hu]=Matrix kliens
|
||||
GenericName[ia]=Cliente de Matrix
|
||||
GenericName[it]=Client Matrix
|
||||
GenericName[nl]=Matrix-client
|
||||
GenericName[nn]=Matrix-klient
|
||||
GenericName[pa]=ਮੈਟਰਿਕਸ ਕਲਾਈਂਟ
|
||||
GenericName[pl]=Program Matriksa
|
||||
GenericName[pt]=Cliente de Matrix
|
||||
GenericName[pt_BR]=Cliente Matrix
|
||||
GenericName[ro]=Client Matrix
|
||||
GenericName[sk]=Matrix Client
|
||||
GenericName[sl]=Odjemalec Matrix
|
||||
GenericName[sv]=Matrix-klient
|
||||
@@ -49,7 +51,6 @@ GenericName[uk]=Клієнт Matrix
|
||||
GenericName[x-test]=xxMatrix Clientxx
|
||||
GenericName[zh_CN]=Matrix 客户端
|
||||
Comment=Client for the Matrix protocol
|
||||
Comment[az]=Matrix protokolu üçün müştəri
|
||||
Comment[ca]=Client per al protocol Matrix
|
||||
Comment[ca@valencia]=Client per al protocol Matrix
|
||||
Comment[de]=Programm für das Matrix-Protokoll
|
||||
@@ -59,13 +60,14 @@ Comment[eu]=Matrix protokolorako bezeroa
|
||||
Comment[fi]=Asiakas Matrix-yhteyskäytännölle
|
||||
Comment[fr]=Client pour le protocole « Matrix »
|
||||
Comment[hu]=Kliens a Matrix protokollhoz
|
||||
Comment[ia]=Cliente per le protocollo de Matrix
|
||||
Comment[it]=Client per il protocollo Matrix
|
||||
Comment[nl]=Client voor het Matrix-protocol
|
||||
Comment[nn]=Lynmeldingsklient for Matrix-protokollen
|
||||
Comment[pa]=ਮੈਟਰਿਕਸ ਪਰੋਟੋਕਾਲ ਲਈ ਕਲਾਈਂਟ ਹੈ
|
||||
Comment[pl]=Program obsługi protokołu Matriksa
|
||||
Comment[pt]=Cliente para o protocolo Matrix
|
||||
Comment[pt_BR]=Cliente para o protocolo Matrix
|
||||
Comment[ro]=Client pentru protocolul Matrix
|
||||
Comment[sk]=Klient protokolu Matrix
|
||||
Comment[sl]=Odjemalec za protokol Matrix
|
||||
Comment[sv]=Klient för protokollet Matrix
|
||||
|
||||
@@ -142,7 +142,6 @@ void ActionsHandler::joinRoom(const QString &alias)
|
||||
joinRoomJob->errorString()));
|
||||
});
|
||||
Quotient::JoinRoomJob::connect(joinRoomJob, &JoinRoomJob::success, [this, joinRoomJob] {
|
||||
qDebug() << "joined" << joinRoomJob->roomId();
|
||||
Q_EMIT roomJoined(joinRoomJob->roomId());
|
||||
});
|
||||
}
|
||||
@@ -160,15 +159,15 @@ void ActionsHandler::createRoom(const QString &name, const QString &topic)
|
||||
|
||||
void ActionsHandler::postMessage(const QString &text,
|
||||
const QString &attachementPath, const QString &replyEventId, const QString &editEventId,
|
||||
const QVariantMap usernames)
|
||||
const QVariantMap &usernames)
|
||||
{
|
||||
QString rawText = text;
|
||||
QString cleanedText = text;
|
||||
|
||||
for (const auto username : usernames.keys()) {
|
||||
const auto replacement = usernames.value(username);
|
||||
cleanedText = cleanedText.replace(username,
|
||||
"[" + username + "](https://matrix.to/#/" + replacement.toString() + ")");
|
||||
|
||||
for (auto it = usernames.constBegin(); it != usernames.constEnd(); it++) {
|
||||
cleanedText = cleanedText.replace(it.key(),
|
||||
"[" + it.key() + "](https://matrix.to/#/" + it.value().toString() + ")");
|
||||
}
|
||||
|
||||
if (attachementPath.length() > 0) {
|
||||
@@ -277,9 +276,6 @@ void ActionsHandler::postMessage(const QString &text,
|
||||
if (rawText.indexOf(partPrefix) == 0) {
|
||||
rawText = rawText.remove(0, partPrefix.length());
|
||||
const QStringList splittedText = rawText.split(" ");
|
||||
qDebug() << m_room;
|
||||
qDebug() << "m_room";
|
||||
qDebug() << splittedText;
|
||||
if (splittedText.count() == 0 || splittedText[0].isEmpty()) {
|
||||
// leave current room
|
||||
m_connection->leaveRoom(m_room);
|
||||
@@ -332,5 +328,5 @@ void ActionsHandler::postMessage(const QString &text,
|
||||
cleanedText = cleanedText.remove(0, noticePrefix.length());
|
||||
messageEventType = RoomMessageEvent::MsgType::Notice;
|
||||
}
|
||||
m_room->postMessage(cleanedText, messageEventType, replyEventId, editEventId);
|
||||
m_room->postMessage(rawText, cleanedText, messageEventType, replyEventId, editEventId);
|
||||
}
|
||||
|
||||
@@ -72,8 +72,7 @@ public Q_SLOTS:
|
||||
///
|
||||
/// This also interprets commands if any.
|
||||
void postMessage(const QString &text, const QString &attachementPath,
|
||||
const QString &replyEventId, const QString &editEventId,
|
||||
const QVariantMap usernames);
|
||||
const QString &replyEventId, const QString &editEventId, const QVariantMap &usernames);
|
||||
|
||||
private:
|
||||
Connection *m_connection = nullptr;
|
||||
|
||||
@@ -11,10 +11,11 @@
|
||||
#include <events/redactionevent.h>
|
||||
#include <events/roomavatarevent.h>
|
||||
#include <events/roommemberevent.h>
|
||||
#include <events/stickerevent.h>
|
||||
#include <events/simplestateevents.h>
|
||||
#include <user.h>
|
||||
|
||||
#include "stickerevent.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QQmlEngine> // for qmlRegisterType()
|
||||
#include <QTimeZone>
|
||||
@@ -46,6 +47,7 @@ QHash<int, QByteArray> MessageEventModel::roleNames() const
|
||||
roles[ShowSectionRole] = "showSection";
|
||||
roles[ReactionRole] = "reaction";
|
||||
roles[IsEditedRole] = "isEdited";
|
||||
roles[FormattedBodyRole] = "formattedBody";
|
||||
return roles;
|
||||
}
|
||||
|
||||
@@ -334,6 +336,16 @@ QVariant MessageEventModel::data(const QModelIndex &idx, int role) const
|
||||
return m_currentRoom->eventToString(evt, Qt::RichText);
|
||||
}
|
||||
|
||||
if (role == FormattedBodyRole) {
|
||||
if (auto e = eventCast<const RoomMessageEvent>(&evt)) {
|
||||
if (e->hasTextContent() && e->mimeType().name() != "text/plain") {
|
||||
return static_cast<const Quotient::EventContent::TextContent *>(e->content())->body;
|
||||
}
|
||||
}
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
if (role == MessageRole) {
|
||||
return m_currentRoom->eventToString(evt);
|
||||
}
|
||||
|
||||
@@ -32,6 +32,7 @@ public:
|
||||
LongOperationRole,
|
||||
AnnotationRole,
|
||||
UserMarkerRole,
|
||||
FormattedBodyRole,
|
||||
|
||||
ReplyRole,
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include "events/roomcanonicalaliasevent.h"
|
||||
#include "events/roommessageevent.h"
|
||||
#include "events/roompowerlevelsevent.h"
|
||||
#include "events/stickerevent.h"
|
||||
#include "stickerevent.h"
|
||||
#include "events/typingevent.h"
|
||||
#include "jobs/downloadfilejob.h"
|
||||
#include "neochatconfig.h"
|
||||
@@ -105,7 +105,6 @@ void NeoChatRoom::uploadFile(const QUrl &url, const QString &body)
|
||||
});
|
||||
connect(this, &Room::fileTransferProgress, [=](const QString &id, qint64 progress, qint64 total) {
|
||||
if (id == txnId) {
|
||||
qDebug() << "Progress:" << progress << total;
|
||||
setFileUploadingProgress(int(float(progress) / float(total) * 100));
|
||||
}
|
||||
});
|
||||
@@ -539,19 +538,17 @@ QString msgTypeToString(MessageEventType msgType)
|
||||
}
|
||||
}
|
||||
|
||||
void NeoChatRoom::postMessage(const QString &text, MessageEventType type, const QString &replyEventId, const QString &relateToEventId)
|
||||
void NeoChatRoom::postMessage(const QString &rawText, const QString &text, MessageEventType type, const QString &replyEventId, const QString &relateToEventId)
|
||||
{
|
||||
const auto html = markdownToHTML(text);
|
||||
QString cleanText(text);
|
||||
cleanText.replace(QRegularExpression("\\[(.+)\\]\\(.+\\)"), "\\1");
|
||||
postHtmlMessage(cleanText, html, type, replyEventId, relateToEventId);
|
||||
postHtmlMessage(rawText, html, type, replyEventId, relateToEventId);
|
||||
}
|
||||
|
||||
void NeoChatRoom::postHtmlMessage(const QString &text, const QString &html, MessageEventType type, const QString &replyEventId, const QString &relateToEventId)
|
||||
{
|
||||
QString htmlWithLinks = html;
|
||||
htmlWithLinks = htmlWithLinks.replace(QRegularExpression("@([^: ]*):([^ ]*\\.[^ ]*)"), "<a href=\"https://matrix.to/#/@$1:$2\">@$1:$2</a>");
|
||||
bool isRichText = Qt::mightBeRichText(htmlWithLinks);
|
||||
bool isRichText = Qt::mightBeRichText(html);
|
||||
bool isReply = !replyEventId.isEmpty();
|
||||
bool isEdit = !relateToEventId.isEmpty();
|
||||
const auto replyIt = findInTimeline(replyEventId);
|
||||
@@ -564,11 +561,15 @@ void NeoChatRoom::postHtmlMessage(const QString &text, const QString &html, Mess
|
||||
QJsonObject json {
|
||||
{"type", "m.room.message"},
|
||||
{"msgtype", msgTypeToString(type)},
|
||||
{"body", "* " + (isRichText ? text : htmlWithLinks)},
|
||||
{"body", "* " + text},
|
||||
{"format", "org.matrix.custom.html"},
|
||||
{"formatted_body", html},
|
||||
{"m.new_content",
|
||||
QJsonObject {
|
||||
{"body", (isRichText ? text : htmlWithLinks)},
|
||||
{"msgtype", msgTypeToString(type)}
|
||||
{"body", text},
|
||||
{"msgtype", msgTypeToString(type)},
|
||||
{"format", "org.matrix.custom.html"},
|
||||
{"formatted_body", html}
|
||||
}
|
||||
},
|
||||
{"m.relates_to",
|
||||
@@ -607,7 +608,7 @@ void NeoChatRoom::postHtmlMessage(const QString &text, const QString &html, Mess
|
||||
"\">In reply to</a> <a href=\"https://matrix.to/#/" +
|
||||
replyEvt.senderId() + "\">" + replyEvt.senderId() +
|
||||
"</a><br>" + eventToString(replyEvt, Qt::RichText) +
|
||||
"</blockquote></mx-reply>" + (isRichText ? htmlWithLinks : text)
|
||||
"</blockquote></mx-reply>" + (isRichText ? html : text)
|
||||
}
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
@@ -139,7 +139,9 @@ public Q_SLOTS:
|
||||
void acceptInvitation();
|
||||
void forget();
|
||||
void sendTypingNotification(bool isTyping);
|
||||
void postMessage(const QString &text, Quotient::MessageEventType type = Quotient::MessageEventType::Text, const QString &replyEventId = QString(), const QString &relateToEventId = QString());
|
||||
/// @param rawText The text as it was typed.
|
||||
/// @param cleanedText The text with link to the users.
|
||||
void postMessage(const QString &rawText, const QString &cleanedText, Quotient::MessageEventType type = Quotient::MessageEventType::Text, const QString &replyEventId = QString(), const QString &relateToEventId = QString());
|
||||
void postHtmlMessage(const QString &text, const QString &html, Quotient::MessageEventType type = Quotient::MessageEventType::Text, const QString &replyEventId = QString(), const QString &relateToEventId = QString());
|
||||
void changeAvatar(const QUrl &localFile);
|
||||
void addLocalAlias(const QString &alias);
|
||||
|
||||
Reference in New Issue
Block a user