Giter Site home page Giter Site logo

ktp-common-internals's People

Contributors

aleixpol avatar alinelena avatar aspotashev avatar cfeck avatar danvratil avatar davidedmundson avatar detrout avatar dfaure avatar drdanz avatar drf avatar faemir avatar flreinhard avatar gkiagia avatar grundleborg avatar jbruechert avatar jriddell avatar kaffeine avatar leonhandreke avatar mck182 avatar nwoki avatar poboiko avatar r4md4c avatar scummos avatar shocklateboy92 avatar smithjd15 avatar tosky avatar tsdgeos avatar vhanda avatar wengxt avatar wormsik avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

simonschmeisser

ktp-common-internals's Issues

MessagesModel: Implement check for messages duplication

"Clients wishing to determine whether a new message with the scrollback header matches a previously-logged message with the same message-token SHOULD compare the message's sender, contents, message-sent or message-received timestamp, etc. Note that, in XMPP, the server only supplies a timestamp for scrollback messages, not for messages received while you are in a room; thus, non-scrollback messages will lack a message-sent timestamp."

Implement Channel Interface MessageArchive support

Implementation for the interface in KTp/Logger/scrollback-manager can be as trivial as:

diff --git a/KTp/Logger/scrollback-manager.cpp b/KTp/Logger/scrollback-manager.cpp
index d9680ae..8f3ab43 100644
--- a/KTp/Logger/scrollback-manager.cpp
+++ b/KTp/Logger/scrollback-manager.cpp
@@ -105,11 +105,15 @@ void ScrollbackManager::fetchHistory(int n)
 {
     if (n > 0 && !d->account.isNull() && !d->textChannel.isNull()) {
         if (d->contactEntity.isValid()) {
-            KTp::LogManager *manager = KTp::LogManager::instance();
-            KTp::PendingLoggerDates *dates = manager->queryDates(d->account, d->contactEntity);
-            connect(dates, SIGNAL(finished(KTp::PendingLoggerOperation*)),
-                    this, SLOT(onDatesFinished(KTp::PendingLoggerOperation*)));
-            return;
+            if (d->textChannel->hasArchiveInterface()) {
+                d->textChannel->getMessages();
+            } else {
+                KTp::LogManager *manager = KTp::LogManager::instance();
+                KTp::PendingLoggerDates *dates = manager->queryDates(d->account, d->contactEntity);
+                connect(dates, SIGNAL(finished(KTp::PendingLoggerOperation*)),
+                        this, SLOT(onDatesFinished(KTp::PendingLoggerOperation*)));
+                return;
+            }
         }
     }

But, it would be much better to implement a proper plugin with KTp::AbstractLoggerPlugin inheritance.

Conversation does not check if account is nullptr

I seem to have a somewhat messed up setup were AccountManager returns a nullptr for /org/freedesktop/Telepathy/Account/ring/tel/account0

MainLogModel::processQueryResults as well as Conversation both do not check the value of account and it therefore crashes later on

(this is mainly a note to myself, remind me if it gets stale ...)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.