Intercept and create matrix.to URLs within the app #547

This commit is contained in:
manuroe
2016-08-29 11:57:01 +02:00
parent 260a1e7f69
commit acdc01c3c2
4 changed files with 35 additions and 20 deletions
+3 -5
View File
@@ -1590,12 +1590,10 @@
__strong __typeof(weakSelf)strongSelf = weakSelf;
[strongSelf cancelEventSelection];
// Create a permalink that is common to all Vector.im clients
NSString *permalink = [NSString stringWithFormat:@"%@/#/room/%@/%@",
[Tools webAppUrl],
selectedEvent.roomId,
selectedEvent.eventId];
// Create a matrix.to permalink that is common to all matrix clients
NSString *permalink = [MXTools permalinkToEvent:selectedEvent.eventId inRoom:selectedEvent.roomId];
// Create a room matrix.to permalink
[[UIPasteboard generalPasteboard] setString:permalink];
}];