mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-05-01 05:36:57 +02:00
https://github.com/vector-im/vector-ios/issues/225: Ability to copy message permalinks
This commit is contained in:
@@ -1309,8 +1309,25 @@
|
||||
|
||||
}];
|
||||
}];
|
||||
|
||||
[self.currentAlert addActionWithTitle:NSLocalizedStringFromTable(@"room_event_action_permalink", @"Vector", nil) style:MXKAlertActionStyleDefault handler:^(MXKAlert *alert) {
|
||||
|
||||
__strong __typeof(weakSelf)strongSelf = weakSelf;
|
||||
[strongSelf cancelEventSelection];
|
||||
|
||||
// Create a permalink that is common to all Vector.im clients
|
||||
// FIXME: When available, use the prod Vector web app URL
|
||||
NSString *webAppUrl = [[NSUserDefaults standardUserDefaults] objectForKey:@"webAppUrlDev"];
|
||||
|
||||
NSString *permalink = [NSString stringWithFormat:@"%@/#/room/%@/%@",
|
||||
webAppUrl,
|
||||
selectedEvent.roomId,
|
||||
selectedEvent.eventId];
|
||||
|
||||
[[UIPasteboard generalPasteboard] setString:permalink];
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
self.currentAlert.cancelButtonIndex = [self.currentAlert addActionWithTitle:NSLocalizedStringFromTable(@"cancel", @"Vector", nil) style:MXKAlertActionStyleDefault handler:^(MXKAlert *alert) {
|
||||
|
||||
__strong __typeof(weakSelf)strongSelf = weakSelf;
|
||||
|
||||
Reference in New Issue
Block a user