chore: use more specific substring to check for temporary event IDs (#3508)

This commit is contained in:
ggurdin 2025-07-21 12:54:43 -04:00 committed by GitHub
parent 1266e9e6f0
commit 37341eccc5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 8 additions and 5 deletions

View file

@ -513,12 +513,11 @@ class PangeaMessageEvent {
return repLocal?.content;
}
if (eventId.contains("web")) return null;
if (eventId.contains("Pangea Chat")) return null;
// should this just be the original event body?
// worth a conversation with the team
final PangeaRepresentation? basis =
(originalWritten ?? originalSent)?.content;
final PangeaRepresentation? basis = originalSent?.content;
// clear representations cache so the new representation event can be added
// when next requested

View file

@ -44,7 +44,7 @@ extension EventsRoomExtension on Room {
}) async {
try {
Sentry.addBreadcrumb(Breadcrumb(data: content));
if (parentEventId.contains("web")) {
if (parentEventId.contains("Pangea Chat")) {
debugger(when: kDebugMode);
Sentry.addBreadcrumb(
Breadcrumb(

View file

@ -393,7 +393,11 @@ class SelectModeButtonsState extends State<SelectModeButtons> {
langCode: l1Code!,
);
widget.overlayController.setTranslation(rep!.text);
if (rep == null) {
throw Exception('Representation is null');
}
widget.overlayController.setTranslation(rep.text);
} catch (e, s) {
_translationError = e.toString();
ErrorHandler.logError(