Menu

#79 support for Adium group chat bookmarks

closed-fixed
Adium
1
2015-01-16
2014-11-12
tonyhidalgo
No

Problem Summary

While Adium with SIPE can "Join Group Chat", connecting to a Lync Persistent Group (Group Chat), it cannot successfully create a re-openable bookmark to this group chat.

Working Comparisons

  • Pidgin with SIPE with on Windows is able to re-open a Lync group chat on connect.
  • Other Pidgin account types like Jabber successfully create re-openable bookmarks to their group chats.

Steps to Reproduce

  1. File -> Join Group Chat
  2. Enter URI of established Lync Persistent Chat room ("ma-chan://<DOMAIN>/<CHAT_GUID>").
  3. Verify chat room opens as Adium tab.
  4. Right click on this Lync chat room tab.
  5. Select "Add Bookmark" and add it to an existing group like "Other Contacts".
  6. Optionally, right click on the Lync room's tab, select "Get Info for Bookmark" then configure "Always Join on Connect"
  7. Close the Lync chat by either closing its tab or closing Adium.
  8. If you re-open Adium, the Lync group chat does not re-open with your other group chat's configured to do so.
  9. With Adium open, if you click the Lync group chat bookmark, Adium pops open an error dialogue which says: "Unable to join bookmarked chat" and "The bookmark <LYNC_GROUP_CHAT_NAME> does not contain enough information and can not be used. Please recreate it next time you join the chat. Would you like to remove this bookmark?"

The current bug work-around is for the user to always have the chat URI available on Adium open, then manually repeating steps 1 and 2 each time.

Debug log and Error Pop-Up screenshot are attached.

Versions

Adium

1.5.10 (5/19/14) (latest release at https://adium.im/)

SIPE

pidgin-sipe-1.18.4-adium-1.5.10-macosx10.9 (latest release at https://sourceforge.net/projects/sipe/files/sipe)

Operating System

OS X 10.9.5

Lync Account Settings

Username: <first>.<last>@<business>.com
Windows Login: <DOMAIN>\first.last
Password: <PASSWORD>

2 Attachments

Discussion

  • Stefan Becker

    Stefan Becker - 2014-11-12

    FYI: the changes of getting this fixed are pretty slim. I have no access to any account which has Group Chat feature enabled. Therefore all bugs & features related to Group Chats are basically ignored, because there is no way to debug or test any code changes.

    From your description my educated guess is that the bug is in Adium, not SIPE, because I'm unable to find the error message in the SIPE code.

     
  • Stefan Becker

    Stefan Becker - 2014-11-12
    • Priority: 4 --> 1
     
  • Michael Lamb

    Michael Lamb - 2014-12-12

    I may have a fix, however I (like Stefan) do not have access to an instance with the Persistent Chat enabled.

    I've attached a build that may fix this, but without being able to step through the code to verify code paths, I can't be sure. Please test and let me know.

     
  • Matzkowsky

    Matzkowsky - 2014-12-19

    I tested the plug-in from Michael, unfortunately it crashes once a group chat is about to join. See attachment for crash details. Because I have a Lync account I can help to develop a fix for this problem. If you point me to the source code and the changes you did I can try to debug the problem.

     
  • Michael Lamb

    Michael Lamb - 2014-12-19

    Unfortunately, this crash dump doesn't help. The call stack in it, doesn't make any sense. Most likely, because it's the main thread, it's bouncing all over the place... some of the methods on the call stack don't call each other so it's hard to tease it out.

    In the current version in the repo, when you get the reported error, look in the debug log... you'll see a clue to the fix ("ESPurpleSIPEAccount needs an implementation of extractChatCreationDictionaryFromConversation to handle rejoins, bookmarks, and invitations properly").

    So, to fix this, the ESPurpleSIPEAccount class needs to have a working implementation. :)

    My guess is, you need to store the ma-chan:// uri in the chatCreationDictionary (which is re-read by the bookmarks code). So when the SIPE core join/rejoin code runs, it can create the group chat with the right parameters.

    Since I can't trace through the code with a persistent chat session, I don't know what comes in with the conv method argument. I went with the likelihood that I would have to "find" the group chat from the conversation... so my implementation of extractChatCreationDictionaryFromConversation tries:

    NSMutableDictionary *dict = [NSMutableDictionary dictionary];
    PurpleChat *purpleChat = purple_blist_find_chat(account, conv->name);
    
    // SIPE core code is looking for a "uri" component... so lets set it
    // hopefully that's all that is required to get Persistent Chat bookmarks to work
    [dict setObject:[NSString stringWithUTF8String:g_hash_table_lookup(purpleChat->components, "uri")] forKey:@"uri"];
    
    return dict;
    

    I would suggest that you add that to your copy of the source, and then step through the join/rejoin sequence and see what you get passed in the conv variable. Then you can return it, and follow the join/rejoin logic to see if it gets referred to properly.

     

    Last edit: Michael Lamb 2014-12-19
  • Matzkowsky

    Matzkowsky - 2014-12-29

    I submitted a patch to the mob repository which uses persistentChatPool_uri from sipe_core_private to remember the ma-chan URI. The patch looks a bit hacky for me. I'm new to SIPE/Adium hacking, so it's likely not the most elegant solution. Feel free to add change requests.
    The patch is tested and works fine for me.

     
    • Stefan Becker

      Stefan Becker - 2014-12-29

      I have reverted this hack, because it violates the core/backend separation.

       
      • Matzkowsky

        Matzkowsky - 2014-12-31

        Stefan,

        could you please provide some guidance how it should be done and what are the constraints?
        It's clear that accessing private structs violates the separation, but how should the solution should look like?
        What about just adding a member to ESPurpleSIPEAccount which stores the URI temporarily?

        Cheers and have a good jump into 2015

        David

         

        Last edit: Stefan Becker 2015-01-01
  • Shawn Kovalchick

    I am having this problem as well. It results in a regular error message popup that is rather annoying. I am happy to provide any information needed to help troubleshooting this issue.

    P.S. Just noticed the previous update, so I will try this and see if it works.

     
  • Stefan Becker

    Stefan Becker - 2015-01-01

    @Matzkowsky: please do not reply to bug mails. This SF feature generates too much junk in discussion threads.

    To answer your question: it depends on the data. What is responsible to create it? What consumes it? What are the channels between producer and consumer?

    Your change shows that you added two methods. The first returns a dictionary and the second receives a dictionary. If that is the same dictionary, why not add the data to it? If not, what data is stored in Adium bookmark? Is it possible to add more data? Have you checked the Jabber code as reference?

    Your solution looks like it only works for one room and if you don't close Adium in the meantime.

     
  • Stefan Becker

    Stefan Becker - 2015-01-03

    Ticket moved from /p/sipe/bugs/272/

    Can't be converted:

    • _milestone: 1.18.x
     
  • Stefan Becker

    Stefan Becker - 2015-01-03

    Bug cleanup. This is a new feature, not a bug, as it requires new implementation.

     
  • Stefan Becker

    Stefan Becker - 2015-01-03
    • summary: Group Chat Bookmarks are not re-openable in Adium --> adium: support for Group Chat bookmarks
     
  • Stefan Becker

    Stefan Becker - 2015-01-09
    • summary: adium: support for Group Chat bookmarks --> support for Adium group chat bookmarks
    • assigned_to: Stefan Becker
     
  • Stefan Becker

    Stefan Becker - 2015-01-09

    Please try with git commit 7753ee4. If I understood Adium correctly then chat bookmarks should work now.

     
  • Stefan Becker

    Stefan Becker - 2015-01-13

    Hey guys, can you please give feedback? I can't test this code myself.

     
  • Stefan Becker

    Stefan Becker - 2015-01-14

    There was a bug in the code which caused a crash when trying to join a group chat.

    Please retry with git commit 9b20926

     
  • Stefan Becker

    Stefan Becker - 2015-01-15

    Adium calls back to SIPE while the chat session is being initialized. Therefore the first attempt couldn't work, because session will always be NULL.

    Please retry with git commit d72ede1

     
  • Stefan Becker

    Stefan Becker - 2015-01-15

    NSDictionary creation was incorrect.

    Please retry with git commit 9cc42fe

     
  • Stefan Becker

    Stefan Becker - 2015-01-16

    Feedback from one user via email: group chat bookmarks work for him now.

    Closing as IMPLEMENTED.

     
  • Stefan Becker

    Stefan Becker - 2015-01-16
    • status: open --> closed-fixed
     

Log in to post a comment.