Opened 13 years ago

Closed 13 years ago

Last modified 12 years ago

#6866 closed enhancement (fixed)

Feature request: display contact alias/contact name instead of identifier in transcripts

Reported by: zee Owned by: nobody
Milestone: Adium X 1.1 Component: Logging
Version: Severity: normal
Keywords: Cc: patches@…
Patch Status: Accepted


Currently, transcripts show only user identifiers in the messages. While it is partly acceptable for jabber/msn, it makes reading and copy-pasting transcripts with ICQ contacts almost impossible, because instead of nice handles there are only numbers. Besides, if a contact is a metacontact and I have assigned an alias (perhaps automatically, by providing the necessary information in the address book), all accounts should display the same alias, instead of different uids — it's the same contact, after all.

Attachments (3)

ticket6866-fix-rev0.diff (1.8 KB) - added by Christopher Harms 13 years ago.
ticket6866-fix-rev1.diff (4.2 KB) - added by Christopher Harms 13 years ago.
ticket6866-fix-rev2.diff (3.7 KB) - added by Christopher Harms 13 years ago.

Download all attachments as: .zip

Change History (26)

comment:1 Changed 13 years ago by Eric Richie

Milestone: Good idea for "later"

comment:2 Changed 13 years ago by Jordan

Resolution: duplicate
Status: newclosed

Dupe: #6760

comment:3 Changed 13 years ago by

Don't think so. That request and patch deal with the contact list on the left side of log viewer window, mine is about the actual log view.

comment:4 Changed 13 years ago by Christopher Harms

This shouldn't be too difficult as well. I'm going to take a look on this within the next days. But this ticket should be reopend, because you're right: this is slightly different.

comment:5 Changed 13 years ago by Eric Richie

Resolution: duplicate
Status: closedreopened

Changed 13 years ago by Christopher Harms

Attachment: ticket6866-fix-rev0.diff added

comment:6 Changed 13 years ago by Christopher Harms

Okay, that's my first proposal to this. As I said, this isn't too difficult. But maybe someone wants to me to change something, so here you go.

comment:7 Changed 13 years ago by Eric Richie

Cc: patches@… added
Patch Status: NoneInitially Included

comment:8 Changed 13 years ago by Eric Richie

field_haspatch: 01

comment:9 Changed 13 years ago by Evan Schoenberg

This would have the effect of modifying displayed content in addition to the identifiers in front of messages, wouldn't it? So if I told someone "my screenname is tekjew" it would show in the log viewer as "my screenname is Evan"?

comment:10 Changed 13 years ago by Christopher Harms

Damn. Of course, you're right. I didn't think of it... So the only possibility to prevent this, would be, changing the string when it's saved to the log, right? Then I'd have to change the code their, but I'm not sure about touching this area of code. Any suggestions?

comment:11 Changed 13 years ago by

That won't help with already existing logs and would probably require changing log xml schema. When I was trying to find out if I can do this (I don't know obj-c because I've only switched recently), I was thinking of doing the uid-handle matching in the GBChatlogHTMLConverter, but that would (probably) require passing contact controller handle to the converter, and I don't know if it's ok in regards to Adium architecture.

comment:12 Changed 13 years ago by Evan Schoenberg

GBChatlogHTMLConverter has no reason to be 'independent' - pass it what you need :) And yes, I think that is the right class in which to do processing.

Changed 13 years ago by Christopher Harms

Attachment: ticket6866-fix-rev1.diff added

comment:13 Changed 13 years ago by Christopher Harms

Jap. Perfect place. But I guess there'll be problems with formats of logs, which aren't passed through the GBChatlogHTMLConverter-Class, i.d. the uids won't be replaced. Nevertheless, this seems to work. Feedback for this is requested.

comment:14 Changed 13 years ago by Evan Schoenberg

There's no good way to do modifications to the HTML logs like that, not cleanly anyways. This is definitely one of the reasons we switched to a machine readable log format (XML) -- the data on disk and the information displayed to the user don't have to be the same thing.

comment:15 Changed 13 years ago by Evan Schoenberg

Lookin' better, Calgan. A couple comments:

  1. Make GBChatlogHTMLConverter a subclass of AIObject rather than NSObject; the 'adium' instance variable and associated code for setting it are then not necessary, as AIObject takes care of that automatically
  1. Some of the strings are more complex than needed; for example,
    shownSender = [NSString stringWithFormat:@"%@", sender]; 

should just be

shownSender = sender;

and similarly for the stringWithString: calls.

comment:16 Changed 13 years ago by Graham Booker

(In [19660]) Include the buddy's display name in the chat transcript view Refs #6866 Not closed since this only handles XML logs.

Changed 13 years ago by Christopher Harms

Attachment: ticket6866-fix-rev2.diff added

comment:17 Changed 13 years ago by Christopher Harms

Changed. But as I see in the chageset [19660] I forgot to release the string. Furthermore, the changeset differs from my version, but it's the same idea.

comment:18 Changed 13 years ago by Graham Booker

Yeah, I took Evan's suggestions (they were good) as well as reorganize the code a bit to be a bit cleaner (less nesting in if statements).

comment:19 Changed 13 years ago by

Thanks, the logs are much more readable now. Two suggestions though:

  • It'd be great if the "to/from" column showed aliases instead of uids too.
  • A preference to hide the uids from the logs altogether would also be nice — there isn't really much point in showing them on each and every message of the log when you can see them in the from/to columns, for example.

I could try to do both of these myself, though, once I get some free time to read about objective c/xcode, so it's by no means of high priority.

One more question: there are no aliases until the protocol for that contact goes online. I've noticed similar behavior in Quicksilver plugin — is it because there's no way at all to get contact handles until the protocol is online or it's just that offline contacts are just handled differently?

comment:20 Changed 13 years ago by Christopher Harms

For your first suggestion see #6760. The "from"-column is missing, actually. But I'll fix this soon. A preference shouldn't be a problem either. But I don't know, when I'm ready to do this.

As far as I can see that, it's impossible to get the aliases while the protocol is offline by the structure of Adium/libpurple. So it's not a bug, but "as designed" (not sure, though).

comment:21 Changed 13 years ago by Evan Schoenberg

AIListContact objects aren't created until the account comes online, at which point their preferences are read and their aliases therefore known. While the log viewer could theoretically create an AIListContact and so forth and then get access to the information, it'd be a significant speed hit, which is why we're using existingContact... methods to only get an AIListContact if one already exists.

Suggestion: Rather than having a new preference *or* forcing a certain behavior, what if the log viewer followed the same preference set by the user for the message view itself? That'd be checking:

  2. Using the {{{KEY_WEBKIT_NAME_FORMAT preference if we're using a custom messaging name style (see AIWebKitMessageViewStyle.h for the enum values)
  3. Failing that, fall back on [contact longDisplayName], which itself follows the preference for the contact list.

comment:22 Changed 13 years ago by Evan Schoenberg

Resolution: fixed
Status: reopenedclosed

(In [19717]) Chat transcripts now follow the messaging name format preferences, falling back on the long display name if no custom format is specified. Fixes #6866. I'm closing this even though old logs (HTML format) are not handled; doing so would be troublesome at best, and those logs are 'legacy' in any case.

comment:23 Changed 13 years ago by Evan Schoenberg

Milestone: Good idea for "later"Adium X 1.1
Patch Status: Initially IncludedAccepted
Note: See TracTickets for help on using tickets.