Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions TelegramTest/TLUserCategory.m
Original file line number Diff line number Diff line change
Expand Up @@ -462,9 +462,7 @@ - (NSString *)fullName {
if(!self.last_name)
self.last_name = @"";

NSString *fullName = [[[[NSString stringWithFormat:@"%@%@%@", self.first_name,self.first_name.length > 0 ? @" " : @"", self.last_name] stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]] singleLine] htmlentities];
if(fullName.length > 30)
fullName = [fullName substringToIndex:30];
NSString *fullName = [[[NSString stringWithFormat:@"%@%@%@", self.first_name,self.first_name.length > 0 ? @" " : @"", self.last_name] stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]] singleLine];


[self setDFullName:fullName];
Expand Down Expand Up @@ -656,10 +654,6 @@ - (NSString *) dialogFullName {

userName = [userName singleLine];

if(userName.length > 30)
userName = [userName substringToIndex:30];


return userName;
}

Expand Down
4 changes: 2 additions & 2 deletions TelegramTest/UsersManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -440,9 +440,9 @@ -(void)updateUserName:(NSString *)userName completeHandler:(void (^)(TLUser *))c

-(void)updateAccount:(NSString *)firstName lastName:(NSString *)lastName completeHandler:(void (^)(TLUser *))completeHandler errorHandler:(void (^)(NSString *))errorHandler {

firstName = firstName.length > 30 ? [firstName substringToIndex:30] : firstName;
firstName = firstName.length > 255 ? [firstName substringToIndex:255] : firstName;

lastName = lastName.length > 30 ? [lastName substringToIndex:30] : lastName;
lastName = lastName.length > 255 ? [lastName substringToIndex:255] : lastName;


if([firstName isEqualToString:self.userSelf.first_name] && [lastName isEqualToString:self.userSelf.last_name])
Expand Down