Widgets: Attempt to re-register for a scalar token if ours is invalid

#2326

As the integration manager page (https://scalar-staging.riot.im/scalar-web) does not return a 403, check scalar token validity before opening it
This commit is contained in:
manuroe
2019-03-12 17:12:44 +01:00
parent 887660ed26
commit f8ea427b62
5 changed files with 126 additions and 54 deletions

View File

@@ -354,7 +354,7 @@ NSString *const kJavascriptSendResponseToPostMessageAPI = @"riotIOS.sendResponse
[WidgetManager.sharedManager deleteDataForUser:widget.mxSession.myUser.userId];
MXWeakify(self);
[WidgetManager.sharedManager getScalarTokenForMXSession:widget.mxSession success:^(NSString *scalarToken) {
[WidgetManager.sharedManager getScalarTokenForMXSession:widget.mxSession validate:NO success:^(NSString *scalarToken) {
MXStrongifyAndReturnIfNil(self);
NSLog(@"[WidgetVC] fixScalarToken: DONE");