Closed EionRobb closed 3 years ago
I presume I need to clear the PURPLE_CBFLAGS_TYPING
flag again manually? Slack only sends a typing indicator once every 3 seconds, so i can set it, and (re)set a timer to clear it.
Though that's a little complicated because I need to keep track of the timeout state per-user/chat combination. I guess I can use a PurpleConvChatBuddy attribute.
Unfortunately the timeout is needed, yes. The PurpleConvChatBuddy doesn't store which PurpleConvChat it's associated with, however, so a different data structure might be needed (or cheating with a g_dataset_set()
to attach the PurpleConvChat to the buddy object)
Tangentially, I have noticed that there's a flicker that happens between the typing events. Is it worth considering changing the serv_got_typing
timeout value from 3 to 5 to allow the server to send another typing event (if it's going to) without causing a UI flicker?
My best idea so far is a list of currently typing chat, user, time_t and a global timeout task that runs whenever it's non empty to clear those that age out. Leaving this for now in case a better idea comes up.
I'm assuming in libpurple3 this will be easier if everything is a gobject because you could keep references to purple objects yourself. It would also be nice if purple_timeout handles were associated with accounts like fetch and such can be, so the prpl doesn't need to keep track of them all to cancel them on close.
Does this issue include sending typing notification to group chats (which seems to be missing), or should I open a separate issue?
libpurple doesn't send typing events for group chats, that I can tell, so it would have to be added there first.
The pidgin-groupchat-typing-notifications plugin sends typing events for group chats
I think this is all done now, for IMs and channels.
Yup it is thanks. I think the timing values aren't quite right, but this particular issue is good enough to close :)
There's currently a
TODO
in the slack-message.c code forslack_user_typing
that says "nothing seems to use [purple_conv_chat_user_set_flags]".The typing flag is used by the https://github.com/EionRobb/pidgin-groupchat-typing-notifications plugin, as well as other UI's such as Adium