mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
26 lines
610 B
Objective-C
26 lines
610 B
Objective-C
#import "TGBridgeUserInfoSignals.h"
|
|
|
|
#import <WatchCommonWatch/WatchCommonWatch.h>
|
|
|
|
#import "TGBridgeClient.h"
|
|
|
|
@implementation TGBridgeUserInfoSignals
|
|
|
|
+ (SSignal *)userInfoWithUserId:(int64_t)userId;
|
|
{
|
|
return [[self usersInfoWithUserIds:@[ @(userId) ]] map:^TGBridgeUser *(NSDictionary *users)
|
|
{
|
|
return users[@(userId)];
|
|
}];
|
|
}
|
|
|
|
+ (SSignal *)usersInfoWithUserIds:(NSArray *)userIds
|
|
{
|
|
return [[[TGBridgeClient instance] requestSignalWithSubscription:[[TGBridgeUserInfoSubscription alloc] initWithUserIds:userIds]] map:^NSDictionary *(id next)
|
|
{
|
|
return next;
|
|
}];
|
|
}
|
|
|
|
@end
|