mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-21 00:52:43 +02:00
Merge branch 'develop' of https://github.com/vector-im/element-ios into langleyd/5292_refresh_tokens
This commit is contained in:
@@ -258,6 +258,7 @@
|
||||
"message_reply_to_sender_sent_an_audio_file" = "sent an audio file.";
|
||||
"message_reply_to_sender_sent_a_voice_message" = "sent a voice message.";
|
||||
"message_reply_to_sender_sent_a_file" = "sent a file.";
|
||||
"message_reply_to_sender_sent_their_location" = "has shared their location.";
|
||||
"message_reply_to_message_to_reply_to_prefix" = "In reply to";
|
||||
|
||||
// Room members
|
||||
|
||||
@@ -476,3 +476,5 @@
|
||||
"auth_invalid_user_name" = "Vigane kasutajanimi";
|
||||
"rename" = "Muuda nime";
|
||||
"room_displayname_all_other_members_left" = "%@ (lahkus(id))";
|
||||
"attachment_unsupported_preview_message" = "See failitüüp ei ole toetatud.";
|
||||
"attachment_unsupported_preview_title" = "Eelvaate kuvamine ei õnnestu";
|
||||
|
||||
@@ -477,3 +477,5 @@
|
||||
"auth_invalid_user_name" = "Érvénytelen felhasználónév";
|
||||
"rename" = "Átnevez";
|
||||
"room_displayname_all_other_members_left" = "%@ (Bal)";
|
||||
"attachment_unsupported_preview_message" = "Ez a fájl típus nem támogatott.";
|
||||
"attachment_unsupported_preview_title" = "Az előnézetet nem lehet megjeleníteni";
|
||||
|
||||
@@ -419,7 +419,7 @@
|
||||
|
||||
// Attachment
|
||||
"attachment_size_prompt" = "Apakah Anda ingin mengirimnya sebagai:";
|
||||
"room_member_power_level_prompt" = "Anda tidak akan lagi membatalkan perubahan ini ketika Anda mempromosikan penggunanya untuk memiliki level kekuatan yang sama dengan Anda sendiri.\nApakah Anda yakin?";
|
||||
"room_member_power_level_prompt" = "Anda tidak akan lagi membatalkan perubahan ini ketika Anda mempromosikan penggunanya untuk memiliki tingkat daya yang sama dengan Anda sendiri.\nApakah Anda yakin?";
|
||||
|
||||
// Room members
|
||||
"room_member_ignore_prompt" = "Apakah Anda yakin untuk menyembunyikan semua pesan dari pengguna ini?";
|
||||
@@ -555,3 +555,5 @@
|
||||
"notice_room_aliases" = "Alias ruangannya adalah: %@";
|
||||
"notice_room_power_level_event_requirement" = "Tingkat daya minimum yang terkait dengan peristiwa adalah:";
|
||||
"notice_room_power_level_acting_requirement" = "Tingkat daya minimum yang harus dimiliki pengguna sebelum bertindak adalah:";
|
||||
"attachment_unsupported_preview_title" = "Tidak dapat ditampilkan";
|
||||
"attachment_unsupported_preview_message" = "Tipe file ini tidak didukung.";
|
||||
|
||||
@@ -476,3 +476,5 @@
|
||||
"room_displayname_all_other_members_left" = "%@ (Uscito)";
|
||||
"auth_username_in_use" = "Nome utente in uso";
|
||||
"rename" = "Rinomina";
|
||||
"attachment_unsupported_preview_message" = "Questo tipo di file non è supportato.";
|
||||
"attachment_unsupported_preview_title" = "Anteprima non disponibile";
|
||||
|
||||
@@ -532,3 +532,11 @@
|
||||
"attachment_size_prompt_message" = "U kunt dit uitzetten in uw instellingen.";
|
||||
"attachment_size_prompt_title" = "Bevestig de afmeting om te versturen";
|
||||
"room_displayname_all_other_participants_left" = "%@ (vertrok)";
|
||||
"auth_reset_password_error_not_found" = "Niet gevonden";
|
||||
"auth_reset_password_error_unauthorized" = "Niet toegestaan";
|
||||
"auth_invalid_user_name" = "Ongeldige inlognaam";
|
||||
"attachment_unsupported_preview_message" = "Dit bestandstype wordt niet ondersteund.";
|
||||
"attachment_unsupported_preview_title" = "Kan geen voorbeeld geven";
|
||||
"room_displayname_all_other_members_left" = "%@ (Vertrok)";
|
||||
"auth_username_in_use" = "Inlognaam al in gebruik";
|
||||
"rename" = "Hernoemen";
|
||||
|
||||
@@ -477,3 +477,5 @@
|
||||
"auth_invalid_user_name" = "Nome de usuária(o) inválido";
|
||||
"rename" = "Renomear";
|
||||
"room_displayname_all_other_members_left" = "%@ (Saiu)";
|
||||
"attachment_unsupported_preview_message" = "Este tipo de arquivo não é suportado.";
|
||||
"attachment_unsupported_preview_title" = "Incapaz de previsualizar";
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -519,3 +519,16 @@
|
||||
"rename" = "Перейменувати";
|
||||
"room_creation_alias_title" = "Псевдоніми кімнати:";
|
||||
"account_email_validation_error" = "Не вдалося перевірити адресу електронної пошти. Перевірте свою електронну пошту та натисніть на посилання в ній. Після цього натисніть продовжити";
|
||||
"auth_reset_password_error_not_found" = "Не знайдено";
|
||||
"auth_reset_password_error_unauthorized" = "Не авторизовано";
|
||||
"auth_invalid_user_name" = "Хибне імʼя користувача";
|
||||
"ssl_could_not_verify" = "Не вдалося перевірити справжність сервера ідентифікації.";
|
||||
"call_consulting_with_user" = "Консультація з %@";
|
||||
"local_contacts_access_discovery_warning_title" = "Виявлення користувачів";
|
||||
"attachment_large_with_resolution" = "Великий %@ (~%@)";
|
||||
"attachment_medium_with_resolution" = "Середній %@ (~%@)";
|
||||
"attachment_small_with_resolution" = "Малий %@ (~%@)";
|
||||
"attachment_size_prompt_message" = "Ви можете вимкнути це у налаштуваннях.";
|
||||
"attachment_size_prompt_title" = "Підтвердити розмір, щоб надіслати";
|
||||
"room_no_power_to_create_conference_call" = "Вам потрібен дозвіл, щоб надсилати запрошення, щоб розпочати конференцію в цій кімнаті";
|
||||
"room_event_encryption_verify_message" = "Щоб переконатися, що цьому сеансу можна довіряти, зв’яжіться з його власником іншим способом (наприклад, особисто чи телефоном) і запитайте його, чи збігається ключ, який вони бачать у налаштуваннях користувача для цього сеансу, з ключем нижче:\n\nНазва сеансу: %@\nID сеансу: %@\nКлюч сеансу: %@\n\nЯкщо він збігається, натисніть кнопку підтвердження внизу. Якщо ні, значить хтось інший перехоплює цей сеанс, і ви, ймовірно, хочете натиснути кнопку чорного списку.\n\nУ майбутньому цей процес перевірки буде ускладнено.";
|
||||
|
||||
@@ -478,3 +478,5 @@
|
||||
"room_displayname_all_other_members_left" = "%@ (离开)";
|
||||
"auth_username_in_use" = "用户名被占用";
|
||||
"rename" = "重命名";
|
||||
"attachment_unsupported_preview_message" = "文件类型不受支持。";
|
||||
"attachment_unsupported_preview_title" = "无法预览";
|
||||
|
||||
@@ -1031,14 +1031,16 @@
|
||||
roomDataSource = nil;
|
||||
|
||||
// Add reason label
|
||||
_leftRoomReasonLabel = [[UILabel alloc] initWithFrame:CGRectMake(10, 5, self.view.frame.size.width - 20, 70)];
|
||||
_leftRoomReasonLabel.numberOfLines = 0;
|
||||
_leftRoomReasonLabel.text = reason;
|
||||
_leftRoomReasonLabel.autoresizingMask = UIViewAutoresizingFlexibleWidth;
|
||||
UILabel *leftRoomReasonLabel = [[UILabel alloc] initWithFrame:CGRectMake(10, 5, self.view.frame.size.width - 20, 70)];
|
||||
leftRoomReasonLabel.numberOfLines = 0;
|
||||
leftRoomReasonLabel.text = reason;
|
||||
leftRoomReasonLabel.autoresizingMask = UIViewAutoresizingFlexibleWidth;
|
||||
_bubblesTableView.tableHeaderView = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, 80)];
|
||||
[_bubblesTableView.tableHeaderView addSubview:_leftRoomReasonLabel];
|
||||
[_bubblesTableView.tableHeaderView addSubview:leftRoomReasonLabel];
|
||||
[_bubblesTableView reloadData];
|
||||
|
||||
_leftRoomReasonLabel = leftRoomReasonLabel;
|
||||
|
||||
[self updateViewControllerAppearanceOnRoomDataSourceState];
|
||||
}
|
||||
|
||||
@@ -2177,12 +2179,12 @@
|
||||
|
||||
if (event && event.eventType == MXEventTypeRoomMessage)
|
||||
{
|
||||
NSString *msgtype = event.content[@"msgtype"];
|
||||
NSString *msgtype = event.content[kMXMessageTypeKey];
|
||||
|
||||
NSString* textMessage;
|
||||
if ([msgtype isEqualToString:kMXMessageTypeText])
|
||||
{
|
||||
textMessage = event.content[@"body"];
|
||||
textMessage = event.content[kMXMessageBodyKey];
|
||||
}
|
||||
|
||||
// Show a confirmation popup to the end user
|
||||
@@ -3666,9 +3668,6 @@
|
||||
MXLogDebug(@"[MXKRoomVC] showAttachmentInCell on an unsent media");
|
||||
}
|
||||
}
|
||||
else if (selectedAttachment.type == MXKAttachmentTypeLocation)
|
||||
{
|
||||
}
|
||||
else if (selectedAttachment.type == MXKAttachmentTypeFile || selectedAttachment.type == MXKAttachmentTypeAudio)
|
||||
{
|
||||
// Start activity indicator as feedback on file selection.
|
||||
|
||||
@@ -145,7 +145,9 @@ static NSString *const kMXAppGroupID = @"group.org.matrix";
|
||||
kMXEventTypeStringCallNegotiate,
|
||||
kMXEventTypeStringSticker,
|
||||
kMXEventTypeStringKeyVerificationCancel,
|
||||
kMXEventTypeStringKeyVerificationDone
|
||||
kMXEventTypeStringKeyVerificationDone,
|
||||
kMXEventTypeStringPollStart,
|
||||
kMXEventTypeStringPollStartMSC3381
|
||||
].mutableCopy;
|
||||
|
||||
|
||||
@@ -175,7 +177,9 @@ static NSString *const kMXAppGroupID = @"group.org.matrix";
|
||||
kMXEventTypeStringCallNegotiate,
|
||||
kMXEventTypeStringSticker,
|
||||
kMXEventTypeStringKeyVerificationCancel,
|
||||
kMXEventTypeStringKeyVerificationDone
|
||||
kMXEventTypeStringKeyVerificationDone,
|
||||
kMXEventTypeStringPollStart,
|
||||
kMXEventTypeStringPollStartMSC3381
|
||||
].mutableCopy;
|
||||
|
||||
lastMessageEventTypesAllowList = @[
|
||||
@@ -186,7 +190,9 @@ static NSString *const kMXAppGroupID = @"group.org.matrix";
|
||||
kMXEventTypeStringCallInvite,
|
||||
kMXEventTypeStringCallAnswer,
|
||||
kMXEventTypeStringCallHangup,
|
||||
kMXEventTypeStringSticker
|
||||
kMXEventTypeStringSticker,
|
||||
kMXEventTypeStringPollStart,
|
||||
kMXEventTypeStringPollStartMSC3381
|
||||
].mutableCopy;
|
||||
|
||||
_messageDetailsAllowSharing = YES;
|
||||
|
||||
@@ -33,7 +33,6 @@ typedef enum : NSUInteger {
|
||||
MXKAttachmentTypeAudio,
|
||||
MXKAttachmentTypeVoiceMessage,
|
||||
MXKAttachmentTypeVideo,
|
||||
MXKAttachmentTypeLocation,
|
||||
MXKAttachmentTypeFile,
|
||||
MXKAttachmentTypeSticker
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@ NSString *const kMXKAttachmentFileNameBase = @"attatchment";
|
||||
else
|
||||
{
|
||||
// Note: mxEvent.eventType is supposed to be MXEventTypeRoomMessage here.
|
||||
NSString *msgtype = eventContent[@"msgtype"];
|
||||
NSString *msgtype = eventContent[kMXMessageTypeKey];
|
||||
if ([msgtype isEqualToString:kMXMessageTypeImage])
|
||||
{
|
||||
_type = MXKAttachmentTypeImage;
|
||||
@@ -109,12 +109,6 @@ NSString *const kMXKAttachmentFileNameBase = @"attatchment";
|
||||
_type = MXKAttachmentTypeVideo;
|
||||
MXJSONModelSetDictionary(_thumbnailInfo, eventContent[@"info"][@"thumbnail_info"]);
|
||||
}
|
||||
else if ([msgtype isEqualToString:kMXMessageTypeLocation])
|
||||
{
|
||||
// Not supported yet
|
||||
// _type = MXKAttachmentTypeLocation;
|
||||
return nil;
|
||||
}
|
||||
else if ([msgtype isEqualToString:kMXMessageTypeFile])
|
||||
{
|
||||
_type = MXKAttachmentTypeFile;
|
||||
@@ -125,7 +119,7 @@ NSString *const kMXKAttachmentFileNameBase = @"attatchment";
|
||||
}
|
||||
}
|
||||
|
||||
MXJSONModelSetString(_originalFileName, eventContent[@"body"]);
|
||||
MXJSONModelSetString(_originalFileName, eventContent[kMXMessageBodyKey]);
|
||||
MXJSONModelSetDictionary(_contentInfo, eventContent[@"info"]);
|
||||
MXJSONModelSetMXJSONModel(contentFile, MXEncryptedContentFile, eventContent[@"file"]);
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@ static NSAttributedString *messageSeparator = nil;
|
||||
return NO;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Add all components of the provided message
|
||||
for (MXKRoomBubbleComponent* component in cellData.bubbleComponents)
|
||||
{
|
||||
|
||||
@@ -115,7 +115,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
NSString *messageType = self.event.content[@"msgtype"];
|
||||
NSString *messageType = self.event.content[kMXMessageTypeKey];
|
||||
|
||||
if (!messageType || !([messageType isEqualToString:kMXMessageTypeText] || [messageType isEqualToString:kMXMessageTypeNotice] || [messageType isEqualToString:kMXMessageTypeEmote]))
|
||||
{
|
||||
|
||||
@@ -591,6 +591,25 @@ extern NSString *const kMXKRoomDataSourceTimelineErrorErrorKey;
|
||||
success:(void (^)(NSString *eventId))success
|
||||
failure:(void (^)(NSError *error))failure;
|
||||
|
||||
/**
|
||||
Send a location message to a room.
|
||||
|
||||
While sending, a fake event will be echoed in the messages list.
|
||||
Once complete, this local echo will be replaced by the event saved by the homeserver.
|
||||
|
||||
@param latitude the location's latitude
|
||||
@param longitude the location's longitude
|
||||
@param description an optional description
|
||||
@param success A block object called when the operation succeeds. It returns
|
||||
the event id of the event generated on the homeserver
|
||||
@param failure A block object called when the operation fails.
|
||||
*/
|
||||
- (void)sendLocationWithLatitude:(double)latitude
|
||||
longitude:(double)longitude
|
||||
description:(NSString *)description
|
||||
success:(void (^)(NSString *))success
|
||||
failure:(void (^)(NSError *))failure;
|
||||
|
||||
/**
|
||||
Send a generic non state event to a room.
|
||||
|
||||
|
||||
@@ -1914,6 +1914,29 @@ typedef NS_ENUM (NSUInteger, MXKRoomDataSourceError) {
|
||||
}
|
||||
}
|
||||
|
||||
- (void)sendLocationWithLatitude:(double)latitude
|
||||
longitude:(double)longitude
|
||||
description:(NSString *)description
|
||||
success:(void (^)(NSString *))success
|
||||
failure:(void (^)(NSError *))failure
|
||||
{
|
||||
__block MXEvent *localEchoEvent = nil;
|
||||
|
||||
// Make the request to the homeserver
|
||||
[_room sendLocationWithLatitude:latitude
|
||||
longitude:longitude
|
||||
description:description
|
||||
localEcho:&localEchoEvent
|
||||
success:success failure:failure];
|
||||
|
||||
if (localEchoEvent)
|
||||
{
|
||||
// Make the data source digest this fake local echo message
|
||||
[self queueEventForProcessing:localEchoEvent withRoomState:self.roomState direction:MXTimelineDirectionForwards];
|
||||
[self processQueuedEvents:nil];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)sendEventOfType:(MXEventTypeString)eventTypeString content:(NSDictionary<NSString*, id>*)msgContent success:(void (^)(NSString *eventId))success failure:(void (^)(NSError *error))failure
|
||||
{
|
||||
__block MXEvent *localEchoEvent = nil;
|
||||
@@ -1951,7 +1974,7 @@ typedef NS_ENUM (NSUInteger, MXKRoomDataSourceError) {
|
||||
else if ([event.type isEqualToString:kMXEventTypeStringRoomMessage])
|
||||
{
|
||||
// And retry the send the message according to its type
|
||||
NSString *msgType = event.content[@"msgtype"];
|
||||
NSString *msgType = event.content[kMXMessageTypeKey];
|
||||
if ([msgType isEqualToString:kMXMessageTypeText] || [msgType isEqualToString:kMXMessageTypeEmote])
|
||||
{
|
||||
// Resend the Matrix event by reusing the existing echo
|
||||
@@ -2697,11 +2720,27 @@ typedef NS_ENUM (NSUInteger, MXKRoomDataSourceError) {
|
||||
- (BOOL)canPerformActionOnEvent:(MXEvent*)event
|
||||
{
|
||||
BOOL isSent = event.sentState == MXEventSentStateSent;
|
||||
BOOL isRoomMessage = event.eventType == MXEventTypeRoomMessage;
|
||||
|
||||
NSString *messageType = event.content[@"msgtype"];
|
||||
if (!isSent) {
|
||||
return NO;
|
||||
}
|
||||
|
||||
return isSent && isRoomMessage && messageType && ![messageType isEqualToString:@"m.bad.encrypted"];
|
||||
if (event.eventType == MXEventTypePollStart) {
|
||||
return YES;
|
||||
}
|
||||
|
||||
BOOL isRoomMessage = (event.eventType == MXEventTypeRoomMessage);
|
||||
|
||||
if (!isRoomMessage) {
|
||||
return NO;
|
||||
}
|
||||
|
||||
NSString *messageType = event.content[kMXMessageTypeKey];
|
||||
if (messageType == nil || [messageType isEqualToString:@"m.bad.encrypted"]) {
|
||||
return NO;
|
||||
}
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (void)setState:(MXKDataSourceState)newState
|
||||
@@ -3912,7 +3951,7 @@ typedef NS_ENUM (NSUInteger, MXKRoomDataSourceError) {
|
||||
|
||||
if ([self canPerformActionOnEvent:event])
|
||||
{
|
||||
NSString *messageType = event.content[@"msgtype"];
|
||||
NSString *messageType = event.content[kMXMessageTypeKey];
|
||||
|
||||
if ([messageType isEqualToString:kMXMessageTypeKeyVerificationRequest])
|
||||
{
|
||||
@@ -3955,7 +3994,7 @@ typedef NS_ENUM (NSUInteger, MXKRoomDataSourceError) {
|
||||
{
|
||||
MXEvent *event = [self eventWithEventId:eventId];
|
||||
BOOL isRoomMessage = event.eventType == MXEventTypeRoomMessage;
|
||||
NSString *messageType = event.content[@"msgtype"];
|
||||
NSString *messageType = event.content[kMXMessageTypeKey];
|
||||
|
||||
return isRoomMessage
|
||||
&& ([messageType isEqualToString:kMXMessageTypeText] || [messageType isEqualToString:kMXMessageTypeEmote])
|
||||
@@ -3976,7 +4015,7 @@ typedef NS_ENUM (NSUInteger, MXKRoomDataSourceError) {
|
||||
}
|
||||
else
|
||||
{
|
||||
editableTextMessage = event.content[@"body"];
|
||||
editableTextMessage = event.content[kMXMessageBodyKey];
|
||||
}
|
||||
|
||||
return editableTextMessage;
|
||||
@@ -4093,7 +4132,7 @@ typedef NS_ENUM (NSUInteger, MXKRoomDataSourceError) {
|
||||
NSString *sanitizedText = [self sanitizedMessageText:text];
|
||||
NSString *formattedText = [self htmlMessageFromSanitizedText:sanitizedText];
|
||||
|
||||
NSString *eventBody = event.content[@"body"];
|
||||
NSString *eventBody = event.content[kMXMessageBodyKey];
|
||||
NSString *eventFormattedBody = event.content[@"formatted_body"];
|
||||
|
||||
if (![sanitizedText isEqualToString:eventBody] && (!eventFormattedBody || ![formattedText isEqualToString:eventFormattedBody]))
|
||||
|
||||
@@ -45,6 +45,11 @@
|
||||
return [MatrixKitL10n messageReplyToSenderSentAFile];
|
||||
}
|
||||
|
||||
- (NSString *)senderSentTheirLocation
|
||||
{
|
||||
return [MatrixKitL10n messageReplyToSenderSentTheirLocation];
|
||||
}
|
||||
|
||||
- (NSString *)messageToReplyToPrefix
|
||||
{
|
||||
return [MatrixKitL10n messageReplyToMessageToReplyToPrefix];
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
date = [searchDataSource.eventFormatter dateStringFromEvent:searchResult.result withTime:YES];
|
||||
|
||||
// Code from [MXEventFormatter stringFromEvent] for the particular case of a text message
|
||||
message = [searchResult.result.content[@"body"] isKindOfClass:[NSString class]] ? searchResult.result.content[@"body"] : nil;
|
||||
message = [searchResult.result.content[kMXMessageBodyKey] isKindOfClass:[NSString class]] ? searchResult.result.content[kMXMessageBodyKey] : nil;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
@@ -175,10 +175,6 @@ static NSString *const kHTMLATagRegexPattern = @"<a href=\"(.*?)\">([^<]*)</a>";
|
||||
{
|
||||
isSupportedAttachment = hasUrl || hasFile;
|
||||
}
|
||||
else if ([msgtype isEqualToString:kMXMessageTypeLocation])
|
||||
{
|
||||
// Not supported yet
|
||||
}
|
||||
else if ([msgtype isEqualToString:kMXMessageTypeFile])
|
||||
{
|
||||
isSupportedAttachment = hasUrl || hasFile;
|
||||
@@ -1252,7 +1248,7 @@ static NSString *const kHTMLATagRegexPattern = @"<a href=\"(.*?)\">([^<]*)</a>";
|
||||
else
|
||||
{
|
||||
NSString *msgtype;
|
||||
MXJSONModelSetString(msgtype, event.content[@"msgtype"]);
|
||||
MXJSONModelSetString(msgtype, event.content[kMXMessageTypeKey]);
|
||||
|
||||
NSString *body;
|
||||
BOOL isHTML = NO;
|
||||
@@ -1267,12 +1263,12 @@ static NSString *const kHTMLATagRegexPattern = @"<a href=\"(.*?)\">([^<]*)</a>";
|
||||
else if (eventThreadIdentifier)
|
||||
{
|
||||
isHTML = YES;
|
||||
MXJSONModelSetString(body, event.content[@"body"]);
|
||||
MXJSONModelSetString(body, event.content[kMXMessageBodyKey]);
|
||||
MXEvent *threadRootEvent = [mxSession.store eventWithEventId:eventThreadIdentifier
|
||||
inRoom:event.roomId];
|
||||
|
||||
NSString *threadRootEventContent;
|
||||
MXJSONModelSetString(threadRootEventContent, threadRootEvent.content[@"body"]);
|
||||
MXJSONModelSetString(threadRootEventContent, threadRootEvent.content[kMXMessageBodyKey]);
|
||||
body = [NSString stringWithFormat:@"<mx-reply><blockquote><a href=\"%@\">In reply to</a> <a href=\"%@\">%@</a><br>%@</blockquote></mx-reply>%@",
|
||||
[MXTools permalinkToEvent:eventThreadIdentifier inRoom:event.roomId],
|
||||
[MXTools permalinkToUserWithUserId:threadRootEvent.sender],
|
||||
@@ -1283,7 +1279,7 @@ static NSString *const kHTMLATagRegexPattern = @"<a href=\"(.*?)\">([^<]*)</a>";
|
||||
}
|
||||
else
|
||||
{
|
||||
MXJSONModelSetString(body, event.content[@"body"]);
|
||||
MXJSONModelSetString(body, event.content[kMXMessageBodyKey]);
|
||||
}
|
||||
|
||||
if (body)
|
||||
@@ -1333,23 +1329,6 @@ static NSString *const kHTMLATagRegexPattern = @"<a href=\"(.*?)\">([^<]*)</a>";
|
||||
*error = MXKEventFormatterErrorUnsupported;
|
||||
}
|
||||
}
|
||||
else if ([msgtype isEqualToString:kMXMessageTypeLocation])
|
||||
{
|
||||
body = body? body : [MatrixKitL10n noticeLocationAttachment];
|
||||
if (![self isSupportedAttachment:event])
|
||||
{
|
||||
MXLogDebug(@"[MXKEventFormatter] Warning: Unsupported attachment %@", event.description);
|
||||
if (_isForSubtitle || !_settings.showUnsupportedEventsInRoomHistory)
|
||||
{
|
||||
body = [MatrixKitL10n noticeInvalidAttachment];
|
||||
}
|
||||
else
|
||||
{
|
||||
body = [MatrixKitL10n noticeUnsupportedAttachment:event.description];
|
||||
}
|
||||
*error = MXKEventFormatterErrorUnsupported;
|
||||
}
|
||||
}
|
||||
else if ([msgtype isEqualToString:kMXMessageTypeFile])
|
||||
{
|
||||
body = body? body : [MatrixKitL10n noticeFileAttachment];
|
||||
@@ -1582,7 +1561,7 @@ static NSString *const kHTMLATagRegexPattern = @"<a href=\"(.*?)\">([^<]*)</a>";
|
||||
else
|
||||
{
|
||||
NSString *body;
|
||||
MXJSONModelSetString(body, event.content[@"body"]);
|
||||
MXJSONModelSetString(body, event.content[kMXMessageBodyKey]);
|
||||
|
||||
// Check sticker validity
|
||||
if (![self isSupportedAttachment:event])
|
||||
@@ -1596,7 +1575,11 @@ static NSString *const kHTMLATagRegexPattern = @"<a href=\"(.*?)\">([^<]*)</a>";
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case MXEventTypePollStart:
|
||||
{
|
||||
displayText = [MXEventContentPollStart modelFromJSON:event.content].question;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
*error = MXKEventFormatterErrorUnknownEventType;
|
||||
break;
|
||||
@@ -1996,7 +1979,7 @@ static NSString *const kHTMLATagRegexPattern = @"<a href=\"(.*?)\">([^<]*)</a>";
|
||||
|
||||
if (event.eventType == MXEventTypeRoomMessage)
|
||||
{
|
||||
NSString *msgtype = event.content[@"msgtype"];
|
||||
NSString *msgtype = event.content[kMXMessageTypeKey];
|
||||
if ([msgtype isEqualToString:kMXMessageTypeEmote] == NO)
|
||||
{
|
||||
NSString *senderDisplayName = [self senderDisplayNameForEvent:event withRoomState:roomState];
|
||||
@@ -2117,7 +2100,7 @@ static NSString *const kHTMLATagRegexPattern = @"<a href=\"(.*?)\">([^<]*)</a>";
|
||||
else if (!_isForSubtitle && event.eventType == MXEventTypeRoomMessage && (_emojiOnlyTextFont || _singleEmojiTextFont))
|
||||
{
|
||||
NSString *message;
|
||||
MXJSONModelSetString(message, event.content[@"body"]);
|
||||
MXJSONModelSetString(message, event.content[kMXMessageBodyKey]);
|
||||
|
||||
if (_emojiOnlyTextFont && [MXKTools isEmojiOnlyString:message])
|
||||
{
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
//
|
||||
// Copyright 2020 The Matrix.org Foundation C.I.C
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
|
||||
typedef NSString *const MXKAnalyticsCategory NS_TYPED_EXTENSIBLE_ENUM;
|
||||
|
||||
/**
|
||||
The analytics category for local contacts.
|
||||
*/
|
||||
static MXKAnalyticsCategory const MXKAnalyticsCategoryContacts = @"localContacts";
|
||||
|
||||
|
||||
typedef NSString *const MXKAnalyticsName NS_TYPED_EXTENSIBLE_ENUM;
|
||||
|
||||
/**
|
||||
The analytics value for accept/decline of local contacts access.
|
||||
*/
|
||||
static MXKAnalyticsName const MXKAnalyticsNameContactsAccessGranted = @"accessGranted";
|
||||
@@ -27,7 +27,6 @@
|
||||
#import "MXKAppSettings.h"
|
||||
#import <MatrixSDK/MXTools.h>
|
||||
#import "MXKSwiftHeader.h"
|
||||
#import "MXKAnalyticsConstants.h"
|
||||
|
||||
#pragma mark - Constants definitions
|
||||
|
||||
@@ -884,9 +883,7 @@ manualChangeMessageForVideo:(NSString*)manualChangeMessageForVideo
|
||||
// Request address book access
|
||||
[[CNContactStore new] requestAccessForEntityType:CNEntityTypeContacts completionHandler:^(BOOL granted, NSError * _Nullable error) {
|
||||
|
||||
[MXSDKOptions.sharedInstance.analyticsDelegate trackValue:[NSNumber numberWithBool:granted]
|
||||
category:MXKAnalyticsCategoryContacts
|
||||
name:MXKAnalyticsNameContactsAccessGranted];
|
||||
[MXSDKOptions.sharedInstance.analyticsDelegate trackContactsAccessGranted:granted];
|
||||
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user