Adium

Ticket #3677 (new enhancement)

Opened 2 years ago

Last modified 1 month ago

Join Group Chat via Applescript

Reported by: ld@ldaley.com Assigned to: applmak
Priority: normal Milestone: Good idea for "later"
Component: AppleScript Version:
Severity: normal Keywords: applescript join group
Cc: Patch: Needs Discussion
Pending: 0

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 on 03/19/2007 06:15:45 PM.
Adds an AppleScript command to join a group chat

Change History

07/31/2006 01:02:44 AM changed by edr1084

  • milestone set to Sometime after 1.0.

08/17/2006 09:53:46 AM changed by cross+adium@distal.com

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.

02/15/2007 01:45:46 PM changed 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.

03/19/2007 06:15:45 PM changed by lxs

  • attachment AppleScriptJoinGroupChat.diff added.

Adds an AppleScript command to join a group chat

03/19/2007 06:24:16 PM changed by lxs

  • patch_status set to Initially Included.
  • field_haspatch set 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.)

03/19/2007 09:55:39 PM changed 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.

03/20/2007 03:26:02 AM changed 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.

03/06/2008 09:58:35 AM changed by Robby

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

05/15/2008 08:38:03 AM changed by djmori

05/24/2008 07:41:13 PM changed by Robby

applmak, are you interested in doing this?

07/16/2008 10:11:43 PM changed 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.