Turning off logging for arbitrary contacts

Daniel Vrátil dvratil at redhat.com
Tue Jul 1 10:53:30 UTC 2014


On Sunday 29 of June 2014 13:12:22 Marcin Ziemiński wrote:
<snip> 
> 2014-06-28 10:42 GMT+02:00 Daniel Vrátil <dvratil at redhat.com>:
> > On Friday 27 of June 2014 00:21:07 David Edmundson wrote:
> > > Filters won't help, the logging is done by an observer in a separate
> > > process.
> > > 
> > > See c0a2104a590e9e68226f836d22ff6e645f3e33d3 in telepathy-logger, it
> > > might do what we want.
> > > 
> > > Dan, can you comment here?
> > 
> > Unfortunately this has been committed after 0.8.0 and there was no new
> > release
> > since then, so distros don't have it.
> > 
> > Maybe you could try asking on telepathy ml what are their release plans
> > for
> > telepathy-logger.
> > 
> > I think I had a patch for telepathy-logger-qt somewhere to add support for
> > the
> > API, but I can't find it. Should be easy to write again though, since it
> > just
> > needs updating spec/Logger.xml.
> > 
> > Dan
> 
> telepathy-logger stores ignorelist using gsettings and doesn't seem to give
> access to it through dbus interfaces.

Hi,

Yep, my bad, sorry. It was the original version of the patch IIRC that used 
dbus.

> I added simple patches to enable it in both telepathy-logger-qt and in
> KTp::Logger.

The tpl-qt patch looks OK - maybe we could ship it now and just wrap the code 
in #ifdef TELEPATHY_LOGGER_CHECK_VERSION(0.8.0) or something like that (not 
sure we have such macro atm).

In the KTp patch, the methods (add/remove) should IMO return bool value to 
indicate success, mostly so that (possible future) backends that do not 
support such feature can just return false instead of failing silently. And 
here too the code could probably go in and just be disabled if TPLOGGERQT <= 
0.8.0

Maybe run both patches through reviewboard, where it's easier to discuss this 
stuff.

> I can't get it working. Every call to disableForEntity ends with crash:
> 
> GLib-CRITICAL **: g_variant_new_string: assertion 'g_utf8_validate (string,
> -1, NULL)' failed
> GLib-CRITICAL **: g_variant_ref_sink: assertion 'value != NULL' failed

Could you please send a full backtrace of the crash? I can't test it locally 
now, but if I see where it crashes, I might remember something from my dark 
glib past :-)

> 
> enableForEntity and isDisabledForEntity do not cause any errors.
> Maybe I do not understand properly glib, hence my problems.
> 
> Still this is not entirely the feature we need. If I understand it
> correctly, when I intend do disable logging for a conversation  I have to
> disable it for both sides of it. 

Hmm, really? The tp-logger patch checks for both message sender and receiver 
whether they are in the ignorelist, so you only need to add the other party to 
the ignorelist, not yourself (the local user) in order for the conversation 
not to be logged.


Dan

> As a consequence I would turn off logging
> of every message I create,  even during unencrypted conversation with
> different contacts.
> I would like to know if it is what we would like to see in KTp and if it
> works properly before I ask on telepathy ml.

-- 
Daniel Vrátil | dvratil at redhat.com | dvratil on #kde-devel, #kontact, #akonadi
Associate Software Engineer
KDE Desktop Team, Red Hat

GPG Key: 0xC59D614F6F4AE348                                                                                                                                                                                          
Fingerprint: 4EC1 86E3 C54E 0B39 5FDD B5FB C59D 614F 6F4A E348     
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-telepathy/attachments/20140701/529386b2/attachment.sig>


More information about the KDE-Telepathy mailing list