Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package libQuotient for openSUSE:Factory 
checked in at 2021-02-25 18:27:37
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libQuotient (Old)
 and      /work/SRC/openSUSE:Factory/.libQuotient.new.2378 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libQuotient"

Thu Feb 25 18:27:37 2021 rev:3 rq:874747 version:0.6.5

Changes:
--------
--- /work/SRC/openSUSE:Factory/libQuotient/libQuotient.changes  2021-01-18 
11:32:34.716697847 +0100
+++ /work/SRC/openSUSE:Factory/.libQuotient.new.2378/libQuotient.changes        
2021-02-25 18:27:46.118193391 +0100
@@ -1,0 +2,8 @@
+Wed Feb 24 04:42:02 UTC 2021 - Dead Mozay <[email protected]>
+
+- Update to version 0.6.5:
+  * Fix rich replies handling.
+  * Support abbreviated aka Reddit-style type specifiers in 
+    Matrix URIs (e.g., matrix:r/quotient:matrix.org) 
+
+-------------------------------------------------------------------

Old:
----
  0.6.4.tar.gz

New:
----
  0.6.5.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libQuotient.spec ++++++
--- /var/tmp/diff_new_pack.nWLapy/_old  2021-02-25 18:27:46.738193794 +0100
+++ /var/tmp/diff_new_pack.nWLapy/_new  2021-02-25 18:27:46.742193797 +0100
@@ -19,7 +19,7 @@
 %define soversion 0_6
 %bcond_with e2ee
 Name:           libQuotient
-Version:        0.6.4
+Version:        0.6.5
 Release:        0
 Summary:        Library for Qt Matrix Clients
 License:        LGPL-2.1-only

++++++ 0.6.4.tar.gz -> 0.6.5.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libQuotient-0.6.4/CMakeLists.txt 
new/libQuotient-0.6.5/CMakeLists.txt
--- old/libQuotient-0.6.4/CMakeLists.txt        2021-01-15 16:53:46.000000000 
+0100
+++ new/libQuotient-0.6.5/CMakeLists.txt        2021-02-21 22:28:57.000000000 
+0100
@@ -4,7 +4,7 @@
 endif()
 
 set(API_VERSION "0.6")
-project(Quotient VERSION "${API_VERSION}.4" LANGUAGES CXX)
+project(Quotient VERSION "${API_VERSION}.5" LANGUAGES CXX)
 
 option(${PROJECT_NAME}_INSTALL_TESTS "install quotest (former qmc-example) 
application" ON)
 # https://github.com/quotient-im/libQuotient/issues/369
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libQuotient-0.6.4/CONTRIBUTING.md 
new/libQuotient-0.6.5/CONTRIBUTING.md
--- old/libQuotient-0.6.4/CONTRIBUTING.md       2021-01-15 16:53:46.000000000 
+0100
+++ new/libQuotient-0.6.5/CONTRIBUTING.md       2021-02-21 22:28:57.000000000 
+0100
@@ -88,8 +88,7 @@
 
 Unless a contributor explicitly specifies otherwise, we assume contributors
 to agree that all contributed code is released either under *LGPL v2.1 or 
later*.
-This is more than just [LGPL v2.1 libQuotient now uses](./COPYING)
-because the project plans to switch to LGPL v3 for library code in the near 
future.
+The project plans to switch to LGPL v3 for library code in the near future.
 <!-- The below is invalid yet!
 All new contributed material that is not executable, including all text when 
not executed, is also released under the
 [Creative Commons Attribution 4.0 International (CC BY 4.0) 
license](https://creativecommons.org/licenses/by/4.0/) or later.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libQuotient-0.6.4/README.md 
new/libQuotient-0.6.5/README.md
--- old/libQuotient-0.6.4/README.md     2021-01-15 16:53:46.000000000 +0100
+++ new/libQuotient-0.6.5/README.md     2021-02-21 22:28:57.000000000 +0100
@@ -14,7 +14,7 @@
 for [Matrix](https://matrix.org). libQuotient is a library that enables client
 applications. It is the backbone of
 [Quaternion](https://github.com/quotient-im/Quaternion),
-[Spectral](https://matrix.org/docs/projects/client/spectral.html) and
+[NeoChat](https://matrix.org/docs/projects/client/neo-chat) and
 other projects.
 Versions 0.5.x and older use the previous name - libQMatrixClient.
 
@@ -77,8 +77,8 @@
 libQuotient, assuming the library development files are installed. There's no
 documented procedure to use a preinstalled library with qmake; consider
 introducing a submodule in your source tree and build it along with the rest
-of the application for now. Note also that qmake is considered for phase-out
-in Qt 6 so you should probably think of moving over to CMake eventually.
+of the application for now. Note also that qmake is no more supported
+in libQuotient 0.7 so you should really think of moving over to CMake.
 
 Building with dynamic linkage is only tested on Linux at the moment and is
 a recommended way of linking your application with libQuotient on this 
platform.
@@ -89,7 +89,8 @@
 most common use cases such as sending messages, uploading files,
 setting room state etc.; for more extensive usage check out the source code
 of [Quaternion](https://github.com/quotient-im/Quaternion)
-(the reference client of Quotient) or 
[Spectral](https://gitlab.com/b0/spectral).
+(the reference client of Quotient) or
+[NeoChat](https://invent.kde.org/network/neochat).
 
 To ease the first step, `tests/CMakeLists.txt` is a good starting point
 for your own CMake-based project using libQuotient.
@@ -160,7 +161,7 @@
 along with the rest of the library can be skipped
 by setting `Quotient_INSTALL_TESTS` to `OFF`.
 
-### qmake-based
+### qmake-based (deprecated)
 The library provides a .pri file with an intention to be included from a 
bigger project's .pro file. As a starting point you can use `quotest.pro` that 
will build a minimal example of library usage for you. In the root directory of 
the project sources:
 ```shell script
 qmake quotest.pro
@@ -173,8 +174,7 @@
 qmake didn't really know about C++17 until Qt 5.12 so if your Qt is older
 you may have quite a bit of warnings during the compilation process.
 
-Installing the standalone library with qmake is not implemented yet; PRs are
-welcome though.
+Installing the standalone library with qmake has not been implemented.
 
 ## Troubleshooting
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libQuotient-0.6.4/SECURITY.md 
new/libQuotient-0.6.5/SECURITY.md
--- old/libQuotient-0.6.4/SECURITY.md   2021-01-15 16:53:46.000000000 +0100
+++ new/libQuotient-0.6.5/SECURITY.md   2021-02-21 22:28:57.000000000 +0100
@@ -6,7 +6,6 @@
 | ------- | ------------------ |
 | master  | :white_check_mark: |
 | 0.6.x   | :white_check_mark: |
-| 0.5.x   | :white_check_mark: |
 | older   | :x:                |
 
 ## Reporting a Vulnerability
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libQuotient-0.6.4/lib/connection.cpp 
new/libQuotient-0.6.5/lib/connection.cpp
--- old/libQuotient-0.6.4/lib/connection.cpp    2021-01-15 16:53:46.000000000 
+0100
+++ new/libQuotient-0.6.5/lib/connection.cpp    2021-02-21 22:28:57.000000000 
+0100
@@ -133,6 +133,11 @@
         != "json";
     bool lazyLoading = false;
 
+    /// \brief Stop resolving and login flows jobs, and clear login flows
+    ///
+    /// Prepares the class to set or resolve a new homeserver
+    void clearResolvingContext();
+
     /** \brief Check the homeserver and resolve it if needed, before connecting
      *
      * A single entry for functions that need to check whether the homeserver
@@ -270,8 +275,7 @@
 
 void Connection::resolveServer(const QString& mxid)
 {
-    if (isJobRunning(d->resolverJob))
-        d->resolverJob->abandon();
+    d->clearResolvingContext();
 
     auto maybeBaseUrl = QUrl::fromUserInput(serverPart(mxid));
     maybeBaseUrl.setScheme("https"); // Instead of the Qt-default "http"
@@ -1530,13 +1534,19 @@
     return d->data->generateTxnId();
 }
 
+void Connection::Private::clearResolvingContext()
+{
+    if (isJobRunning(resolverJob))
+        resolverJob->abandon();
+    if (isJobRunning(loginFlowsJob))
+        loginFlowsJob->abandon();
+    loginFlows.clear();
+
+}
+
 void Connection::setHomeserver(const QUrl& url)
 {
-    if (isJobRunning(d->resolverJob))
-        d->resolverJob->abandon();
-    if (isJobRunning(d->loginFlowsJob))
-        d->loginFlowsJob->abandon();
-    d->loginFlows.clear();
+    d->clearResolvingContext();
 
     if (homeserver() != url) {
         d->data->setBaseUrl(url);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libQuotient-0.6.4/lib/events/roommessageevent.cpp 
new/libQuotient-0.6.5/lib/events/roommessageevent.cpp
--- old/libQuotient-0.6.4/lib/events/roommessageevent.cpp       2021-01-15 
16:53:46.000000000 +0100
+++ new/libQuotient-0.6.5/lib/events/roommessageevent.cpp       2021-02-21 
22:28:57.000000000 +0100
@@ -313,7 +313,7 @@
     const auto actualJson = isReplacement(relatesTo)
                                 ? json.value("m.new_content"_ls).toObject()
                                 : json;
-    // Special-casing the custom matrix.org's (actually, Riot's) way
+    // Special-casing the custom matrix.org's (actually, Element's) way
     // of sending HTML messages.
     if (actualJson["format"_ls].toString() == HtmlContentTypeId) {
         mimeType = HtmlMimeType;
@@ -338,12 +338,15 @@
     }
     if (relatesTo) {
         json->insert(QStringLiteral("m.relates_to"),
-                     QJsonObject { { "rel_type", relatesTo->type }, { 
EventIdKey, relatesTo->eventId } });
+                     relatesTo->type == RelatesTo::ReplyTypeId() ?
+                         QJsonObject { { relatesTo->type, QJsonObject{ { 
EventIdKey, relatesTo->eventId } } } } :
+                         QJsonObject { { "rel_type", relatesTo->type }, { 
EventIdKey, relatesTo->eventId } }
+        );
         if (relatesTo->type == RelatesTo::ReplacementTypeId()) {
             QJsonObject newContentJson;
             if (mimeType.inherits("text/html")) {
-                json->insert(FormatKey, HtmlContentTypeId);
-                json->insert(FormattedBodyKey, body);
+                newContentJson.insert(FormatKey, HtmlContentTypeId);
+                newContentJson.insert(FormattedBodyKey, body);
             }
             json->insert(QStringLiteral("m.new_content"), newContentJson);
         }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libQuotient-0.6.4/lib/uri.cpp 
new/libQuotient-0.6.5/lib/uri.cpp
--- old/libQuotient-0.6.4/lib/uri.cpp   2021-01-15 16:53:46.000000000 +0100
+++ new/libQuotient-0.6.5/lib/uri.cpp   2021-02-21 22:28:57.000000000 +0100
@@ -7,13 +7,19 @@
 using namespace Quotient;
 
 struct ReplacePair { QByteArray uriString; char sigil; };
-/// Defines bi-directional mapping of path prefixes and sigils
+/// \brief Defines bi-directional mapping of path prefixes and sigils
+///
+/// When there are two prefixes for the same sigil, the first matching
+/// entry for a given sigil is used.
 static const auto replacePairs = {
-    ReplacePair { "user/", '@' },
+    ReplacePair { "u/", '@' },
+    { "user/", '@' },
     { "roomid/", '!' },
+    { "r/", '#' },
     { "room/", '#' },
     // The notation for bare event ids is not proposed in MSC2312 but there's
     // https://github.com/matrix-org/matrix-doc/pull/2644
+    { "e/", '$' },
     { "event/", '$' }
 };
 
@@ -94,7 +100,7 @@
         case 2:
             break;
         case 4:
-            if (splitPath[2] == "event")
+            if (splitPath[2] == "event" || splitPath[2] == "e")
                 break;
             [[fallthrough]];
         default:
@@ -147,7 +153,8 @@
 
 Uri::SecondaryType Uri::secondaryType() const
 {
-    return pathSegment(*this, 2) == "event" ? EventId : NoSecondaryId;
+    const auto& type2 = pathSegment(*this, 2);
+    return type2 == "event" || type2 == "e" ? EventId : NoSecondaryId;
 }
 
 QUrl Uri::toUrl(UriForm form) const
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libQuotient-0.6.4/tests/quotest.cpp 
new/libQuotient-0.6.5/tests/quotest.cpp
--- old/libQuotient-0.6.4/tests/quotest.cpp     2021-01-15 16:53:46.000000000 
+0100
+++ new/libQuotient-0.6.5/tests/quotest.cpp     2021-02-21 22:28:57.000000000 
+0100
@@ -726,12 +726,15 @@
         roomId, "matrix:roomid/" + roomId.mid(1),
         "https://matrix.to/#/%21"/*`!`*/ + roomId.mid(1),
         roomAlias, "matrix:room/" + roomAlias.mid(1),
+        "matrix:r/" + roomAlias.mid(1),
         "https://matrix.to/#/"; + roomAlias,
     };
     const QStringList userUris { userId, "matrix:user/" + userId.mid(1),
+                                 "matrix:u/" + userId.mid(1),
                                  "https://matrix.to/#/"; + userId };
     const QStringList eventUris {
         "matrix:room/" + roomAlias.mid(1) + "/event/" + eventId.mid(1),
+        "matrix:r/" + roomAlias.mid(1) + "/e/" + eventId.mid(1),
         "https://matrix.to/#/"; + roomId + '/' + eventId
     };
     // Check that reserved characters are correctly processed.
@@ -745,6 +748,7 @@
     static const QStringList joinByAliasUris {
         Uri(joinRoomAlias.toUtf8(), {}, joinQuery.mid(1)).toDisplayString(),
         "matrix:room/" + encodedRoomAliasNoSigil + joinQuery,
+        "matrix:r/" + encodedRoomAliasNoSigil + joinQuery,
         "https://matrix.to/#/%23"/*`#`*/ + encodedRoomAliasNoSigil + joinQuery,
         "https://matrix.to/#/%23"; + joinRoomAlias.mid(1) /* unencoded */ + 
joinQuery
     };

Reply via email to