Room preview of room link: Try to get more information to display from the hs

This commit is contained in:
manuroe
2016-04-15 11:55:41 +02:00
parent b4e7537301
commit 21ee7b6454
3 changed files with 47 additions and 5 deletions
+13 -1
View File
@@ -44,7 +44,8 @@
@property (nonatomic) MXSession *mxSession;
/**
TODO
Preview information.
They come from the `emailInvitationParams` or [self fetchPreviewData].
*/
@property (nonatomic, readonly) NSString *roomName;
@property (nonatomic, readonly) NSString *roomAvatarUrl;
@@ -60,4 +61,15 @@
- (instancetype)initWithRoomId:(NSString*)roomId andSession:(MXSession*)mxSession;
- (instancetype)initWithRoomId:(NSString*)roomId emailInvitationParams:(NSDictionary*)emailInvitationParams andSession:(MXSession*)mxSession;
/**
Attempt to get more information from the homeserver about the room.
NOTE: This method is temporary while we do not support the full room preview
with preview of messages.
@param completion the block called when the request is complete. `successed` means
the homeserver provided some information.
*/
- (void)fetchPreviewData:(void (^)(BOOL successed))completion;
@end