diff --git a/lib/event_ds.dart b/lib/event_ds.dart index 92ef3d2..71adbeb 100644 --- a/lib/event_ds.dart +++ b/lib/event_ds.dart @@ -177,6 +177,7 @@ class EventData { switch(kind) { case 1: + case 42: evaluatedContent = expandMentions(content); if( translator != null && gTranslate && !evaluatedContent.isEnglish()) { if( gDebug > 0) print("found that this comment is non-English: $evaluatedContent"); @@ -287,11 +288,12 @@ class EventData { } String getAsLine({int len = 20}) { - if( len == 0 || len > content.length) { - len = content.length; + String contentToPrint = evaluatedContent.isEmpty? content: evaluatedContent; + if( len == 0 || len > contentToPrint.length) { + len = contentToPrint.length; } - return '"${content.substring(0, len)}..." - ${getAuthorName(pubkey)}'; + return '"${contentToPrint.substring(0, len)}..." - ${getAuthorName(pubkey)}'; } String getStrForChannel(int depth) { @@ -299,7 +301,7 @@ class EventData { String name = getAuthorName(pubkey); String strDate = getPrintableDate(createdAt); String tempEvaluatedContent = evaluatedContent; - String tempContent = content; + String tempContent = evaluatedContent.isEmpty? content: evaluatedContent; if( isHidden) { name = ""; diff --git a/pubspec.yaml b/pubspec.yaml index bad4cb1..6701fa9 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,8 @@ name: nostr_console description: A multi-platform nostr client built for terminal/console. version: 0.0.7-beta -homepage: https://github.com/vishalxl/nostr_console for 3-4 sept 2022 +homepage: https://github.com/vishalxl/nostr_console +# translations and mentions enabled for channel messages while printing # build where dm can be read