maemo-leste / conversations

1 stars 0 forks source link

Feature: filter overview #9

Closed sanderfoobar closed 2 years ago

sanderfoobar commented 2 years ago

Wizzup writes:

Ability to only show message overview for specific telepathy account (sms, irc1, irc2, xmpp1, slack1, etc)

to-do:

  1. How to know which TP accounts are available?
  2. How to change the rtcom query such that one can filter on individual TP accounts?
  3. UI-wise, facilitate an (theoretically) endless amount of accounts
MerlijnWajer commented 2 years ago

So for (1), I think the Tp::AccountManager interface has methods to get all accounts (be that valid, online, active, all, etc): https://telepathy.freedesktop.org/doc/telepathy-qt/a07532.html#afcbeaa97f26550e011089f3a17ea1377

My recent changes to the telep branch also make use of this manager.

Of course, if there is history from an account that doesn't exist any more, this could potentially cause some trouble.

Filtering by TP account can make sense, but we could also filter by service id in combination with the local_id (from the rtcom database), e.g.:

sqlite> select distinct local_uid from events where local_uid not like '%ofono%';
ring/tel/ring
sofiasip/sip/merlijnwajer_40ekiga_2enet0
spirit/skype/wizzy_2e_2e0
sofiasip/sip/sip_2exs4all_2enl0
idle/irc/fremantle0
idle/irc/leste
gabble/jabber/merlijn@jabber.org
haze/jabber/merlijn@jabber.org
gabble/jabber/merlijn@conversations.im
MerlijnWajer commented 2 years ago

I think (2) will follow from how we decide to filter exactly, in (1)

MerlijnWajer commented 2 years ago

So these local_uid's as far as I know are not necessarily a 1:1 mapping to Telepathy, but I did write code in the telep branch to try to do that. The local_uid is kind of canonical, so it's something like cmName()/protocolName()/displayName(). Whether this is future proof I don't know.

MerlijnWajer commented 2 years ago

There is some code in Sender::sendMessage that tries to find the Tp accounts for a rtcom identifier, I think.

sanderfoobar commented 2 years ago

Note to self, to connect to IRC via the UI, we'll need:

sudo apt install -y rtcom-accounts-ui rtcom-accounts-plugins rtcom-presence-ui telepathy-idle
sanderfoobar commented 2 years ago

So, I prefer to focus on the QML side of things, my requirements for filtering the overview UI are:

  1. Draw, in QML, a list of available "accounts" (like "IRC" or "SMS")
  2. The user can click on those, which will fire a rtcom query that filters on that specific type

I'm trying to avoid dealing with telepathy in-depth, as UI development is already complicated / time-consuming as it is.

So in order to advance things, @MerlijnWajer will have to come up with either an explanation that fully encompasses the above requirements, or provide a ready-to-use interface for my QML to use.