Added logs for Shura to help me to debug a download attachment issue

This commit is contained in:
Blue 2022-01-15 15:36:49 +03:00
parent 296328f12d
commit 62a59eb7a1
Signed by: blue
GPG Key ID: 9B203B252A63EE38
6 changed files with 14 additions and 3 deletions

View File

@ -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

View File

@ -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)

View File

@ -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);

View File

@ -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());

View File

@ -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));

View File

@ -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);
}