[Telepathy] addReceivedMessage method

George Kiagiadakis gkiagia at tolabaki.gr
Sun Jul 24 08:19:00 UTC 2016


On 07/23/2016 11:48 PM, Mateus Bellomo wrote:
> Hello,
> 
> I would like to know if there is a page describing the
> addReceivedMessage() telepathy method. I have searched at google but
> didn't find anything, just usage examples at [1], [2], [3] and [4].

I don't think so, this is something specific to telepathy-qt and it's
not documented. I guess the best documentation for you is the source
code [1] :)

> At [5] there is a Tp::BaseChannelTextTye class reference but there is no
> description of addReceivedMessage() method.
> 
> I'm asking that because Empathy it's not showing the contact name, as it
> should, when it loads a conversation from history. I have looked the log
> generated at ~/.local/share/TpLogger/logs/* and I saw that this logs are
> stored as a xml. And I also noticed that the attribute 'name' is
> responsible for holding the names that appears in conversation history:
> 
> <message time='20160723T03:09:26' id='mateusbellomo at sip.antisip.com
> <mailto:mateusbellomo at sip.antisip.com>' name='' token='' isuser='true'
> type='normal'>just testing</message>
> 
> I saw that this attribute is appearing empty in my generated log and
> don't know how to set it. My guess is that this is set at
> addReceivedMessage() method and right now I'm setting the same
> attributes as telepathy-morse and telepathy-nonsense.

My guess is that telepathy-logger and Empathy try to get the contact's
name by using the Connection.I.Aliasing interface [2]. Do you implement
Tp::BaseConnectionAliasingInterface [3] in your CM?


[1].
https://cgit.freedesktop.org/telepathy/telepathy-qt/tree/TelepathyQt/base-channel.cpp#n473
[2].
https://telepathy.freedesktop.org/spec/Connection_Interface_Aliasing.html
[3]. https://telepathy.freedesktop.org/doc/telepathy-qt/a00091.html



More information about the telepathy mailing list