Crash in adium

Evan Schoenberg, M.D. evan at adium.im
Fri Apr 23 17:40:54 UTC 2010


On Apr 17, 2010, at 1:39 PM, Peter Hosey wrote:

> 
> What I'm proposing is that we continue storing the user's settings for their Facebook account(s) the same way we have been doing, rather than storing them as an XMPP account would. Basically, store the user's settings according to the service the account uses, rather than according to the protocol the service uses. This removes the need to “migrate” the user's data from one settings format to another.
> 

Preferences on an account are stored by its internalObjectID, which is a number unique to that account.  There's no necessary link to the service or the protocol the account uses.

In fact, code is already in place to seamless switch from one service to another at load-time. From AdiumAccounts:
/*!
 * @brief ServiceID upgrade code (v0.63 -> v0.70 for libpurple, v0.70 -> v0.80 for bonjour, v1.0 -> v1.1 for libpurple)
 *
 * The changed name will only be saved if some other account change, such as adding an account, occurs,
 * so this code should remain indefinitely to provide an upgrade path to people whose service IDs are in an
 * old style.
 *
 * @param serviceID NSString service ID (old or new)
 * @param accountDict Dictionary of the saved account
 * @return NSString service ID (new), or nil if unable to upgrade
 */
- (NSString *)_upgradeServiceID:(NSString *)serviceID forAccountDict:(NSDictionary *)accountDict
{
...
}

An XMPP subclass implementing a new Facebook XMPP-based service just needs to know to add @facebook.com (or whatever the suffix is for the JID) to the stored name if it's not already present.

-Evan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://adium.im/pipermail/devel_adium.im/attachments/20100423/a23eeb87/attachment-0002.html>


More information about the devel mailing list