From d94d2714084ce04be6d6f34f98ac81293b6fc97c Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Thu, 7 Feb 2008 22:06:17 +0000 Subject: [PATCH] Monotone-Parent: bdeecb17bba3ba4439fbdfd9d95154dcaf1b3e54 Monotone-Revision: 998f8668c2a6175352cb3f2d659db5aa04b0fa39 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2008-02-07T22:06:17 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 4 ++++ SoObjects/SOGo/SOGoUser.m | 8 +++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 206765292..001304afe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2008-02-07 Wolfgang Sourdeau + * SoObjects/SOGo/SOGoUser.m ([SOGoUser -mailAccounts]): if the + loginname for the default mail account contains an "@", it should + be url-escaped to avoid confusing NSURL. + * SoObjects/SOGo/SOGoUserFolder.m ([-login]): removed useless method. ([SOGoUserFolder -ownerInContext:_ctx]): compute the owner name diff --git a/SoObjects/SOGo/SOGoUser.m b/SoObjects/SOGo/SOGoUser.m index 81187c6d1..a9ec7d78a 100644 --- a/SoObjects/SOGo/SOGoUser.m +++ b/SoObjects/SOGo/SOGoUser.m @@ -454,14 +454,16 @@ NSString *SOGoWeekStartFirstFullWeek = @"FirstFullWeek"; { NSMutableDictionary *mailAccount, *identity; NSMutableArray *identities; - NSString *name, *fullName; + NSString *name, *fullName, *userName; NSArray *mails; unsigned int count, max; mailAccount = [NSMutableDictionary dictionary]; + userName = [[login stringByReplacingString: @"@" withString: @"%40"] + stringByEscapingURL]; name = [NSString stringWithFormat: @"%@@%@", - login, fallbackIMAP4Server]; - [mailAccount setObject: login forKey: @"userName"]; + userName, fallbackIMAP4Server]; + [mailAccount setObject: userName forKey: @"userName"]; [mailAccount setObject: fallbackIMAP4Server forKey: @"serverName"]; [mailAccount setObject: name forKey: @"name"];