Bug 91671 - [next] PresenceSpec default type should be Unset instead of Unknown
Summary: [next] PresenceSpec default type should be Unset instead of Unknown
Status: RESOLVED MOVED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: tp-qt (show other bugs)
Version: unspecified
Hardware: All All
: medium enhancement
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-18 03:01 UTC by James Smith
Modified: 2019-12-03 20:29 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Implement unset connection presence type in Tp::PresenceSpec. (1.28 KB, text/plain)
2015-08-18 03:01 UTC, James Smith
Details

Description James Smith 2015-08-18 03:01:34 UTC
Created attachment 117749 [details]
Implement unset connection presence type in Tp::PresenceSpec.

We use this in a few places, and have to manually create the presence. This patch makes it simpler to create such presences.
Comment 1 James Smith 2016-11-11 05:30:38 UTC
*Bump*
Comment 2 George Kiagiadakis 2016-11-11 07:44:34 UTC
What is the context of use of this? The spec says "unset" is an invalid presence, used as the null value. This would be equivalent to creating a PresenceSpec() using the default constructor in tp-qt. Why do you specifically need to use "unset"?
Comment 3 James Smith 2016-11-16 15:59:41 UTC
Unset presences can indicate that an account-specific override presence is required because there is no specific presence tied to that account set by a user. It can also indicate that there is no auto presence available, and that the user presence (or override) should be used. Loading a set of user presences from disk should also use an unset presence type for unfound entries.  Ideally, it would make sense to have all new presences created use this spec definition. Is there really any reason to return a Tp::ConnectionPresenceType of Unknown instead? Unknown seems to be only for unsubscribed contacts, not user set presences.
Comment 4 George Kiagiadakis 2016-11-17 10:56:16 UTC
(In reply to James Smith from comment #3)
> Ideally, it would make sense to have all new presences created use
> this spec definition. Is there really any reason to return a
> Tp::ConnectionPresenceType of Unknown instead? Unknown seems to be only for
> unsubscribed contacts, not user set presences.

You are right about that. A an invalid PresenceSpec, created with the default constructor, should return Unset instead of Unknown as its type. I will change that in 1.0. Then we will only need a Presence::unknown() method and this will cover it all. I think this is better than having a Presnce::unset() method, as it kind of contradicts the spec (Unset vs Unknown).
Comment 5 James Smith 2016-11-17 17:17:42 UTC
The original patch should also be included, since it can also be useful to clear an existing presence.
Comment 6 GitLab Migration User 2019-12-03 20:29:47 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/telepathy/telepathy-qt/issues/49.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.