diff --git a/CHANGELOG.md b/CHANGELOG.md index 09c382a..4052647 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## Squawk 0.2.1 (UNRELEASED) +### Bug fixes + +### Improvements + +### New features + ## Squawk 0.2.0 (Jan 10, 2022) ### Bug fixes - carbon copies switches on again after reconnection diff --git a/CMakeLists.txt b/CMakeLists.txt index b104667..cd9d793 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.4) -project(squawk VERSION 0.2.0 LANGUAGES CXX) +project(squawk VERSION 0.2.1 LANGUAGES CXX) cmake_policy(SET CMP0076 NEW) cmake_policy(SET CMP0079 NEW) diff --git a/core/archive.cpp b/core/archive.cpp index 2ca409c..cb65a53 100644 --- a/core/archive.cpp +++ b/core/archive.cpp @@ -123,6 +123,7 @@ bool Core::Archive::addElement(const Shared::Message& message) if (!opened) { throw Closed("addElement", jid.toStdString()); } + qDebug() << "Adding message with id " << message.getId(); QByteArray ba; QDataStream ds(&ba, QIODevice::WriteOnly); message.serialize(ds); diff --git a/core/handlers/messagehandler.cpp b/core/handlers/messagehandler.cpp index 33b3458..eb840f8 100644 --- a/core/handlers/messagehandler.cpp +++ b/core/handlers/messagehandler.cpp @@ -80,6 +80,7 @@ bool Core::MessageHandler::handleChatMessage(const QXmppMessage& msg, bool outgo Contact* cnt = acc->rh->getContact(jid); if (cnt == 0) { cnt = acc->rh->addOutOfRosterContact(jid); + qDebug() << "appending message" << sMsg.getId() << "to an out of roster contact"; } if (outgoing) { if (forwarded) { @@ -162,6 +163,7 @@ void Core::MessageHandler::initializeMessage(Shared::Message& target, const QXmp id = source.id(); } target.setStanzaId(source.stanzaId()); + qDebug() << "initializing message with originId:" << source.originId() << ", id:" << source.id() << ", stansaId:" << source.stanzaId(); #else id = source.id(); #endif @@ -170,6 +172,7 @@ void Core::MessageHandler::initializeMessage(Shared::Message& target, const QXmp if (messageId.size() == 0) { target.generateRandomId(); //TODO out of desperation, I need at least a random ID messageId = target.getId(); + qDebug() << "Had do initialize a message with no id, assigning autogenerated" << messageId; } target.setFrom(source.from()); target.setTo(source.to()); diff --git a/core/main.cpp b/core/main.cpp index d6eea3e..7c94a12 100644 --- a/core/main.cpp +++ b/core/main.cpp @@ -54,7 +54,7 @@ int main(int argc, char *argv[]) #endif QApplication::setApplicationName("squawk"); QApplication::setApplicationDisplayName("Squawk"); - QApplication::setApplicationVersion("0.2.0"); + QApplication::setApplicationVersion("0.2.1"); QTranslator qtTranslator; qtTranslator.load("qt_" + QLocale::system().name(), QLibraryInfo::location(QLibraryInfo::TranslationsPath)); diff --git a/ui/widgets/messageline/messagefeed.cpp b/ui/widgets/messageline/messagefeed.cpp index 733cf1d..4803dce 100644 --- a/ui/widgets/messageline/messagefeed.cpp +++ b/ui/widgets/messageline/messagefeed.cpp @@ -86,7 +86,7 @@ void Models::MessageFeed::addMessage(const Shared::Message& msg) emit newMessage(msg); if (observersAmount == 0 && !msg.getForwarded()) { //not to notify when the message is delivered by the carbon copy - unreadMessages->insert(msg.getId()); //cuz it could be my own one or the one I read on another device + unreadMessages->insert(id); //cuz it could be my own one or the one I read on another device emit unreadMessagesCountChanged(); emit unnoticedMessage(msg); }