Bug 44891 - extend TpMessage convenience API to cover most documented fields
Summary: extend TpMessage convenience API to cover most documented fields
Status: RESOLVED MOVED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: tp-glib (show other bugs)
Version: git master
Hardware: Other All
: medium enhancement
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
URL:
Whiteboard:
Keywords: love
Depends on:
Blocks:
 
Reported: 2012-01-18 03:10 UTC by Simon McVittie
Modified: 2019-12-03 20:39 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Simon McVittie 2012-01-18 03:10:02 UTC
10:32 < jpwhiting> 21:59:12> jonnylamb: how does one set the timestamp for an 
                   incoming message on the TpMessage?
...
10:32 < jonnylamb> 22:01:51> or tp_message_set_int64 (msg, 0, 
                   "message-received", time (NULL));
10:32 < jpwhiting> 22:02:53> jonnylamb: ah, ok, is there a list of what headers 
                   are possible to set?
10:32 < jonnylamb> 22:03:05> yes.
10:32 < jonnylamb> 22:03:28> the spec.
...
10:32 < oggis_> 22:03:31> in the tp spec which you're not supposed to need to 
                read :)

Apps doing advanced things, and particularly CMs, will always need access to extension points like tp_message_set(), but we could make life easier for typical clients and even simple CMs.

Things a client may want to set before submitting a message (i.e. read/write for TpMessage):

* header: sender-nickname
* header: message-type

Things a CM may want to set before signalling a sent/received message (i.e. read-only for clients, settable for CMs - either on TpMessage or TpCMMessage):

* header: message-token
* header: message-sent
* header: message-received
* header: scrollback (indirectly gettable via tp_message_to_text())
* body: truncated (indirectly gettable via tp_message_to_text())

Things that are already covered adequately:

* header: pending-message-id (settable via TpCMMessage)
* header: message-sender, message-sender-id (gettable via
  TpSignalledMessage, settable via TpCMMessage)
* header: rescued (settable via the TpMessageMixin)

More complex, do them later (e.g. clone the bug):

* header: supersedes, original-message-sent, original-message-received
  (support for superseded messages; the latter two must be optional)
* body: convenience API for specific use-cases, e.g. HTML body after
    Bug #15449 has been solved

Things that are too complex, and should just use the extension-point API, because anyone using them is expected to be reading the spec anyway:

* interface
* body parts in general (not just specific use-cases)
Comment 1 GitLab Migration User 2019-12-03 20:39:29 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-glib/issues/83.


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.