Opened 7 years ago

Closed 6 years ago

#5528 closed enhancement (fixed)

showing idle time, adding server to group chat dialog, print chat status

Reported by: Tony Owned by:
Priority: normal Milestone: 0.14
Component: None Version: 0.13.1
Severity: normal Keywords: patch
Cc: lemonyogster@… Blocked By:
Blocking: OS: All

Description

Problem

-Don't see user idle time
-Joining a group chat isn't easy
-chat status in chat window can be annoying

Analysis

-Looks like most of the code is there, but isn't set up for idle query
-Conference room server should be added automatically or have a drop down
-print_status_in_chats shouldn't be hidden in the advanced options

Enhancement recommendation

-Allow use if iq:last query to user/server
-Add a server box to the group chat window
-Add check box to turn off printing chat status in window

Attachments (3)

gajim.zip (199.5 KB) - added by Tony 7 years ago.
Source code files I edited
gajim_diff_patches.zip (40.1 KB) - added by lemonyogster@… 7 years ago.
Diff patches as requested, separate ones, and a total patch
gajim_group_chat.patch (10.5 KB) - added by lemonyogster@… 6 years ago.
Changed behavior to allow pasting conference room when starting new group chat, 5 sec timeout when converting to muc

Download all attachments as: .zip

Change History (16)

Changed 7 years ago by Tony

Source code files I edited

comment:1 Changed 7 years ago by asterix

this code is not usable, could you please attach a diff instead (hg diff > gajim.patch)

and it would be much easier if you open one ticket per issue, and one patch per ticket.

Changed 7 years ago by lemonyogster@…

Diff patches as requested, separate ones, and a total patch

comment:2 Changed 7 years ago by lemonyogster@…

  • Status changed from new to needinfo

I separated my changes and made diffs and then just in case I did a diff of the total of my changes. I'll make separate tickets from now on if I try to make any more changes.

comment:3 follow-up: Changed 7 years ago by asterix

  • Milestone Patches Welcome deleted

Great. Thanks a lot for those patches that are nicely coded.

Here are some comments:

  • Why is it usefull to be able to choose MUC room name when we convert chat to muc? Why not just use unique room as we did?
  • I'm not sure it's a good idea to show a checkbutton to turn off printing chat status in window. We cannot show in UI all preferences we have. We can already configure that for bookmarked room in UI.

I've not carefully read idle time patch because it seems a bit complicated. Will look atthat later.

comment:4 in reply to: ↑ 3 Changed 7 years ago by lemonyogster@…

You're welcome. I hope you think about adding them to Gajim. And to respond to your comments:

  • I added the room name entry in the convert chat to muc dialog in case the server didn't respond properly to the unique room request. I'm not sure how often that would be the case, but Openfire does have that bug currently. It just doesn't respond to the request. I thought something was wrong with Gajim until I looked at the XML console and saw it sent a request and never got an answer. Plus, it just seemed like it might be nice to have the option to make a meaningful name when using that feature.
  • The check button for the printing chat status seemed like a thing the normal user might want to be able change easily. It's a judgment call, I guess. Someone asked if I could stop the status updates and was happy to find there was already an option when I started to look how to add one so I just made it visible.
  • As for the idle, most of the ground work was there, but it seemed like you stopped short of implementing it. You had a way to find the idle in Windows or Unix with sleepy.py, but you used idle.py instead. Then you would send 0 instead of a proper error response. I added the info to the hover tooltip in a quickie way, maybe you could do it a little more elegantly. I made it separate from last status time since that was locally stored information and could be used when idle wasn't supported by the other client or as a reference for when someone went 'busy,' but would come back occasionally.

I was a little sloppy with the 'total' patch because it included keeping the active tab as the window title of chats (another requested change) and Glade made more changes to the glade files than I copied into the separate patches.

comment:5 Changed 7 years ago by asterix

Of course I'm thinking about including that in sources.

  • I'm not sure it's a good idea to let user choose room name when converting chat to MUC. The idea of this feature is to be as simple as possible, so nothing for the user to choose. I understand your problem with Openfire, but as you said, it's a bug there, not in Gajim, and I'm really not in favor of adding workarounds in Gajim for server bugs. So this argument count for 0 for me.
  • I really wonder if it's useful to put it here. Because options in bookmark manager will overwrite the one defined in pref window. So users will wonder why in pref it's written to show messages but they are not shown. Because User forgot that he changed setting in manage bookmark window. But it seems other users in the room want this checkbutton, so why not... But ... print_status_in_chat only deals with normal chat, not groupchats. there is print_status_in_muc too. Maybe we could do that:
    print status: in chats: [checkbox], in groupchats: [combobox with All / Enter and leave only / None]
    

What do you think?

  • Ok why not

comment:6 Changed 7 years ago by Yann Leboulanger <asterix@…>

(In [087651c47549]) [Tony] print idle time in tooltip. see #5528

comment:7 Changed 7 years ago by lemonyogster@…

  • I definitely see your point not wanting specific workarounds. Could just have a time limit on the request and go to the randomized name method like when the unique room request fails, but I wasn't sure how to go about that. How did you feel about the changes I made to the "Join Group Chat"? I just noticed it doesn't act properly if you go from the "Advanced functions" or right click on a contact though. I noticed the error message had been changed for bad room names, but I didn't know how to start a group chat before that. Plus, it's nice not having to type the 'conference.server' in.
  • I'm confused...do you want the box to be in the "Manage Bookmarks" window? That seems like an odd place to put it. I knew it only works in chats, but that option doesn't show up any where but the advanced options otherwise, right? It looks like the Manage window has a "Default" option in the combo box and I think that the default could be based on my checkbox. Checked would represent All as the default. Or it could be one option and my checkbox would be changed to a similar combobox? This would also help with new/un-bookmarked rooms.
  • Just had another question about the other part of the 'total' patch that slipped in. Did you think keeping the active tab as the window title was a good add? With more chats it took the form 'user (+x more) - Gajim). I'll open a separate ticket and make a patch if so. Also, it seemed a little odd that it only showed the current user if the windows were grouped into a single chat window.

comment:8 Changed 7 years ago by asterix

  • Yep, why not using a timeout. We already have such a workarround for pubsub: ejabberd take some hours to reply to a pubsub request ... So we fall back to private storage after 30 seconds to get bookmark list. It's not very nice, but that doesn't cost so much, so why not. For the Join Group Chat dialog, it was also discussed in another ticket. I'ts nice to separate fields, but that also mean that you cannot copy / paste a room jid in this dialog ... But I'm in favor of separating fields, so if you could fix behaviour when running from advanced menu and right click on a contact that would be nice.
  • We have several options: show_status_in_chat (boolean) for normal chat, show_status_in_muc (string with 3 options: none, all, in_and_out) for groupchats, and we also have the same option for each bookmarked room, which override the default show_status_in_muc option. The option per room is already presented in manage bookmark window.
  • Hmmm ... I don't really know ... I'm not sure "User A (+2 more) - Gajim" is a nice title ...

comment:9 Changed 7 years ago by Yann Leboulanger <asterix@…>

  • Milestone set to 0.14
  • Resolution set to fixed
  • Status changed from needinfo to closed

(In [760ea23b02a8]) Split room jid field in join groupchat dialog. Fixes #5528 Add browse rooms button in join groupchat dialog. Fixes #3546

Changed 6 years ago by lemonyogster@…

Changed behavior to allow pasting conference room when starting new group chat, 5 sec timeout when converting to muc

comment:10 Changed 6 years ago by lemonyogster@…

  • Status changed from closed to needinfo

Got busy with other stuff, but I did make my patch for updating the way making group chats work a little better.

  • Now, when you start a new group chat, if you past a room name into the room text box, ie room@…, it will put "room" in the name and "conference.server" in the server combo entry box. Or if you type @, it will shift focus to the server combo entry box.
  • When converting a conversation to a group chat (from an open chat), I removed the check box and just put a 5 sec timeout function on the query for a unique room name. If it doesn't get a response from the server, it makes up a name. I noticed that if you close the window, there would be an error, so I tried to put a check in to see that the dialog was still open before trying to make a room.

comment:11 Changed 6 years ago by Yann Leboulanger <asterix@…>

(In [f9df1d014d1b]) [lemonyogster] don't allow to put @ in room entry in join groupchat dialog and automatically switch to server entry. see #5528

comment:12 Changed 6 years ago by asterix

I applied the first point, nice thing.

For the second part, the set_alarm, I'm not sure it's a good solution. Because if we get something in the next 5 seconds that is not related with the unique_room_id thing, the _create_unique_room function won't be called.

comment:13 Changed 6 years ago by asterix

  • Status changed from needinfo to closed
Note: See TracTickets for help on using tickets.