Tp::Presence already enables one to set all fields of Presence with
Tp::Presence::setStatus(ConnectionPresenceType type, QString status, QString statusMessage)
and also with
Currently when you want to set just a presenceMessage and leave the current presence type for one of your accounts, you have to use
currentPresence.setStatus(currentPresence.type(), currentPresence.status(), presenceMessage).
So this patch adds a simple setter for presenceMessage - setPresenceMessage(QString).
Umm, where is the patch? :P
Created attachment 54972 [details] [review]
Oops, how did I miss uploading it??
The patch is fine. I was about to comment about missing documentation... but there is no documentation for anything in Tp::Presence.
So, now we have:
setStatus(type, status, message) // sets all
setStatusMessage(message) // keeps the current status
I think this is exactly what we should have. The type and status can't be sensibly set separately, because they are tied together. Also, whether a message can be set depends on the status in many protocols, so if you change the status, the message can't necessarily stay the same.
I've added a TODO note to explain this when the class in general is documented properly... and merged your patch to master. Will be in tp-qt-0.9.1.