Merge pull request #3857 from element-hq/feature/bma/legacyCallIteration

Update the strings for unsupported calls
This commit is contained in:
Benoit Marty 2024-11-12 20:45:05 +01:00 committed by GitHub
commit 9863cbfd93
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 18 additions and 21 deletions

View file

@ -91,7 +91,7 @@ class DefaultRoomLastMessageFormatter @Inject constructor(
val message = sp.getString(CommonStrings.common_unsupported_event)
message.prefixIfNeeded(senderDisambiguatedDisplayName, isDmRoom, isOutgoing)
}
is LegacyCallInviteContent -> sp.getString(CommonStrings.common_call_invite)
is LegacyCallInviteContent -> sp.getString(CommonStrings.common_unsupported_call)
is CallNotifyContent -> sp.getString(CommonStrings.common_call_started)
}?.take(MAX_SAFE_LENGTH)
}

View file

@ -52,13 +52,11 @@ class DefaultTimelineEventFormatter @Inject constructor(
is StateContent -> {
stateContentFormatter.format(content, senderDisambiguatedDisplayName, isOutgoing, RenderingMode.Timeline)
}
is LegacyCallInviteContent -> {
sp.getString(CommonStrings.common_call_invite)
}
is CallNotifyContent -> {
sp.getString(CommonStrings.common_call_started)
}
RedactedContent,
is LegacyCallInviteContent,
is StickerContent,
is PollContent,
is UnableToDecryptContent,

View file

@ -151,7 +151,7 @@ class DefaultNotifiableEventResolver @Inject constructor(
noisy = isNoisy,
timestamp = this.timestamp,
senderDisambiguatedDisplayName = getDisambiguatedDisplayName(content.senderId),
body = stringProvider.getString(CommonStrings.common_call_invite),
body = stringProvider.getString(CommonStrings.common_unsupported_call),
roomName = roomDisplayName,
roomIsDm = isDm,
roomAvatarPath = roomAvatarUrl,

View file

@ -588,7 +588,7 @@ class DefaultNotifiableEventResolverTest {
noisy = false,
timestamp = A_TIMESTAMP,
senderDisambiguatedDisplayName = A_USER_NAME_2,
body = "Call in progress (unsupported)",
body = "Unsupported call",
imageUriString = null,
imageMimeType = null,
threadId = null,

View file

@ -247,6 +247,7 @@ Reason: %1$s."</string>
<string name="common_unable_to_invite_title">"Unable to send invite(s)"</string>
<string name="common_unlock">"Unlock"</string>
<string name="common_unmute">"Unmute"</string>
<string name="common_unsupported_call">"Unsupported call"</string>
<string name="common_unsupported_event">"Unsupported event"</string>
<string name="common_username">"Username"</string>
<string name="common_verification_cancelled">"Verification cancelled"</string>