Adium

Ticket #3677 (new enhancement)

Opened 4 years ago

Last modified 2 months ago

Join Group Chat via Applescript

Reported by: ld@ldaley.com Owned by: applmak
Milestone: Adium 1.4.x Component: AppleScript
Version: Severity: normal
Keywords: applescript join group Cc:
Patch Status: Needs Dev Review

Description

It would be nice to be able to join group chats via applescript, particularly Jabber/GTalk groups so Adium could be configured to automatically join a group on sign on.

Attachments

AppleScriptJoinGroupChat.diff (4.5 KB) - added by lxs 3 years ago.
Adds an AppleScript command to join a group chat

Change History

Changed 4 years ago by edr1084

  • milestone set to Sometime after 1.0

Changed 4 years ago by cross+adium@…

I very much agree, and want this. I know 1.0 is feature-frozen, but I see that "chat" is scriptable, would adding "join group chat" as an applescriptable event be that hard? Can we set the milestone to 1.1? Thanks.

Changed 3 years ago by pgroce

Well, 1.0's final. :)

I realize the Milestone is set to "later," but I'd like to make a case for putting this in now. There's a real need among us Jabber users for some group chat support -- autojoin on startup, or showing group chats in the buddy list, or _something_ that prevents me from having to type in all the info for the chat every single day, sometimes multiple times a day. (Okay, that slid into first person, but I don't think I'm alone in this.)

Making a "join group chat" applescript command work seems like the simplest way to ease that pain. If you want to solve it in one of the other ways, that's fine, but I'd really love to see this prioritized for the next feature release.

Changed 3 years ago by lxs

Adds an AppleScript command to join a group chat

Changed 3 years ago by lxs

  • patch_status set to Initially Included
  • field_haspatch changed from 0 to 1

Added a patch I am currently using to join Jabber group chats at work. It is generic (ie: works with all the chat plugins) but this makes the syntax a little weird because it uses the AppleScript record type to pass in the chat plugin options. Not sure if you want it, but I figured I'd put it up here in case anyone finds it useful.

Here's an example of joining a Jabber chat room:

join group chat first Adium controller on service "Jabber" with name "MyChatRoom@conference.jabber.org" with settings {room:"MyChatRoom", server:"conference.jabber.org"}

(Note that "with name" just determines the window title. The actual chat room settings go in the record argument to "with settings". If you want to join a different chat room type just look up the chat settings for that plugin in the source code.)

Changed 3 years ago by cbarrett

  • patch_status changed from Initially Included to Needs Discussion

This is a good initial first step, but passing the info dict right in isn't right. Should be able to do all that from Applescript. lxs, if you're interested, could you improve this?

Maybe someone else will.

Changed 3 years ago by lxs

I agree that passing the info dict in directly is ugly and prevents the AppleScript dictionary from documenting the syntax. Unfortunately it's hard to specify the options directly when each chat plugin could have different options. I suspect a better solution involves each plugin creating its own join group chat applescript command (eg: "join Jabber chat ..."). That way you get readable syntax and documentation in the dictionary.

Alternatively if group chat information can be saved in the Contacts list then join group chat could be implemented the same way the create chat AppleScript command is implemented. But again that's a lot more code to write. My patch was just the quickest way to get the desired functionality, which is what I needed at the time. Unfortunately I don't really have time to implement a polished solution.

Changed 2 years ago by Robby

  • owner changed from nobody to applmak
  • component changed from Adium Core to Scripting
  • pending set to 0

Changed 22 months ago by djmori

Changed 22 months ago by Robby

applmak, are you interested in doing this?

Changed 20 months ago by jorj

There is a simple version of this already, which isn't quite as feature-rich. 1.3 betas can do the following from AppleScript:

GetURL " xmpp://room@server?join"

It's not pretty, and certainly a fuller version would be nicer.

Changed 7 months ago by Robby

  • milestone changed from Good idea for "later" to Adium 1.4

Changed 4 months ago by zacw

  • milestone changed from Adium 1.4 to Adium 1.4.x

I agree that this patch might be acceptable with some cleanup, but I do not like the idea of exposing internal libpurple things (the concepts in the dict, really) to AppleScript. An acceptable patch with service-specific commands would be welcome. If I get a chance, I'll look into doing this for a future 1.4 release.

Changed 2 months ago by hildjj

Re: jorj, there are no slashes in that sort of xmpp: URI, like mailto:.

See:  http://xmpp.org/rfcs/rfc5122.html and  http://xmpp.org/extensions/xep-0045.html#registrar-querytypes-join

So, your example should be xmpp:room@server?join

Note: See TracTickets for help on using tickets.