Adium

Ticket #3548 (closed defect: fixed)

Opened 3 years ago

Last modified 4 months ago

Zephyr message display

Reported by: raeburn@mit.edu Assigned to: nobody
Priority: normal Milestone: Adium 1.3
Component: Zephyr Version: 1.0b8
Severity: minor Keywords:
Cc: Patch: Accepted
Pending: 0

Description

(What, Zephyr isn't popular enough to get its own component listing? :-)

I've noticed a couple of minor problems with the display of Zephyr messages.

First: In Zephyr's equivalent of a "group chat", at least as Adium implements it, the "sender" of a message as displayed groups together two pieces of information, the sender, and the Zephyr "instance" field. E.g., if I subscribe to messages in class "help", instance "*" -- that's the magic wildcard string in that field -- and recipient "*" -- the magic string for "everybody", meaning public/group messages, not personal messages for specific users -- and user "joe" sends to class "help" instance "emacs", the message is listed as coming from "joeemacs". (Though the participant's name is still listed as "joe".) I don't have any good idea for a better place to put the instance info, but separating the two with a space would make for easier reading, if it doesn't break anything. (It might be desirable to have a preferences option for breaking down the Zephyr "chat rooms" by instance as well as class, even if the subscription uses the wildcard instance, and it's probably a good thing more often than not, but it won't be the right thing all the time.)

Second: One of the popular early Zephyr clients did a bunch of message formatting using inline formatting commands included by the sender, starting with at-sign. So @i(foo) would show "foo" italicized (on a display device that supports doing so), @b{foo} for bold, etc. There are a handful of commands and a few grouping characters (parens, curly braces, I think square brackets ... that might be all) that can be used after those that take parameters. I don't remember the full set...

But Adium (or Gaim?) seems a bit too aggressive about trying to process these. Some @-sequences that syntactically look like they could be formatting commands, but in fact are not any of the defined commands, seem to be getting "processed" in a way that causes a string to disappear. For example, if I send "foo@mit.edu (or something)", the standard Zephyr client displays "foo@mit.edu (or something)", but Adium shows me "fooor something". I guess something has decided that @mit.edu is supposed to be a command because it starts with "@", and it doesn't do anything, but it and the parens following should go away.

I expect this is not trivial to fix without staring at more Zephyr code, and when I get time (definitely not in the next couple weeks or so), I'd like to try my hand at it. But in the shorter term I'd request a simpler fix, namely a preferences option for turning off all of this formatting processing.

Attachments

zephyr-class.diff (1.3 kB) - added by rwbarton on 05/04/2008 01:50:09 PM.
Better formatting of sender in zephyr classes
before-patch.png (21.5 kB) - added by rwbarton on 05/04/2008 03:33:04 PM.
Behavior in Adium 1.2.5
after-patch.png (21.2 kB) - added by rwbarton on 05/04/2008 03:33:26 PM.
zephyr-class-2.diff (1.4 kB) - added by rwbarton on 05/04/2008 03:57:44 PM.

Change History

07/29/2006 05:01:22 PM changed by edr1084

  • milestone set to Needs feedback from users.

Have you tested this in 1.0? (I don't use Zephyr so I can't test it myself.) Please let us know if anything has been fixed or if these are still issues that need dealt with at some point.

08/09/2006 10:39:36 AM changed by raeburn@mit.edu

No change as of 1.0b8, and I haven't had a chance to dig into the code myself yet...

(follow-up: ↓ 6 ) 09/27/2006 08:37:03 PM changed by evands

The basic position of both the Adium and Gaim teams on Zephyr is that as it's a protocol for hackers by hackers, problems need to be fixed by patches -- nobody on either development team uses the protocol. I don't mean to be discouraging at all, and I'll happily accept patches (either to Adium or Gaim) which improve the implementation.. but getting your hands dirty is probably the only way you'll see these issues fixed.

09/27/2006 08:37:36 PM changed by evands

  • component changed from Other Protocol to Zephyr.

09/27/2006 08:39:21 PM changed by evands

  • milestone deleted.

(in reply to: ↑ 3 ) 09/27/2006 08:40:56 PM changed by raeburn

Yeah, I'm not surprised, and I do mean to get to it, in my oh so copious free time... just haven't managed to, yet....

10/08/2006 04:58:49 PM changed by tick

Also, please keep tickets to 1 issue per ticket.

10/18/2006 12:04:17 AM changed by edr1084

  • version changed from 0.89 to 1.0b8.
  • milestone set to Possible Third Party Plugins.

Moving this to possible plugins for now to let people know that this is something we wouldn't mind having people work on for us if they so desire.

05/04/2008 01:50:09 PM changed by rwbarton

  • attachment zephyr-class.diff added.

Better formatting of sender in zephyr classes

05/04/2008 02:11:04 PM changed by rwbarton

About the first problem:

libpurple sends Adium a recipient string of the form "username instance". The default account code in Adium then strips out spaces, yielding the result that raeburn described. I wrote a little patch that parses these strings, tries to find the username in our contacts, and separates the username and instance with a slash and some spaces. So the result in the example would be "joe / emacs", or maybe "Joe User / emacs".

I can't reproduce the second issue with the current Adium; it looks like @b, etc. are just being ignored. (Which is fine: owl, a popular zephyr client, also ignores them.)

05/04/2008 02:38:40 PM changed by evands

  • patch_status set to None.
  • pending changed.

Looks fairly reasonable to me. Couple proposed changes:

  1. I think rangeOfString:options:range: is a better choice than a one-character rangeOfCharacterInSet: call
  2. Why do we need to call super's contactWithUID: at all? It seems that the result is producing 2 contacts, one of which we never use. Could we just use the username produced by the split rather than looking up the new contact's displayName?

05/04/2008 03:18:10 PM changed by rwbarton

1. [sourceUID rangeOfString:@" "] works, and is probably simplest. (I'm not really an Objective-C programmer, and was translating strchr(sourceUID, ' ') from C.)

2. The goal is that if you get a message in a zephyr class from 'rwbarton', instance 'test', it should show up as 'Reid Barton / test', if you have a contact list entry for rwbarton. (Just as, in a non-group chat, Adium shows the real name rather than the username.) I don't know whether I've achieved that in the best way.

05/04/2008 03:33:04 PM changed by rwbarton

  • attachment before-patch.png added.

Behavior in Adium 1.2.5

05/04/2008 03:33:26 PM changed by rwbarton

  • attachment after-patch.png added.

05/04/2008 03:35:53 PM changed by evands

Ah, I understand. I think we should maintain the 'rwbarton' part... so use the username instead of display name in constructing the group-chat-contact's UID ("rwbarton / test"), then set a display name on the contact before returning:

[contactWithInstance setDisplayName:[contact displayName]];

05/04/2008 03:57:30 PM changed by rwbarton

Oh, that is a better approach. The new patch doesn't change the contact's UID at all, just sets a nicely-formatted displayName. (I do want to include the instance in the displayName, since it's often important context for the message.)

05/04/2008 03:57:44 PM changed by rwbarton

  • attachment zephyr-class-2.diff added.

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

07/20/2008 11:15:05 AM changed by evands

  • patch_status changed from None to Accepted.

07/20/2008 11:15:11 AM changed by evands

  • milestone changed from Possible Third Party Plugins to Adium X 1.3.

07/20/2008 11:15:41 AM changed by evands

  • status changed from new to closed.
  • resolution set to fixed.

(In [24439]) Improved display of Zephyr contacts in group chats. Patch from rwbarton, thanks. Fixes #3548