mirror of
https://github.com/vishalxl/nostr_console.git
synced 2025-10-10 19:32:34 +02:00
added t tag to messages with #tags
This commit is contained in:
@@ -19,6 +19,22 @@ String getPostKindFrom(enumRoomType eType) {
|
||||
|
||||
}
|
||||
|
||||
Set<String>? getTagsFromContent(String content) {
|
||||
Set<String>? tags = null;
|
||||
|
||||
String regexp1 = '(#[a-zA-Z0-9_\-]+ )|(#[a-zA-Z0-9_\-]+)\$';
|
||||
RegExp httpRegExp = RegExp(regexp1);
|
||||
|
||||
for( var match in httpRegExp.allMatches(content) ) {
|
||||
if( tags == null)
|
||||
tags = {};
|
||||
|
||||
tags.add( content.substring(match.start + 1, match.end) );
|
||||
}
|
||||
return tags;
|
||||
}
|
||||
|
||||
|
||||
class HistogramEntry {
|
||||
String str;
|
||||
int count;
|
||||
|
Reference in New Issue
Block a user