From 1bf4698ee4eaecce9a6fdb028b94a97ec1c9006a Mon Sep 17 00:00:00 2001 From: Vishal <64505169+vishalxl@users.noreply.github.com> Date: Wed, 28 Dec 2022 15:06:53 +0530 Subject: [PATCH] when expanding mentions in case p or e is not found then .. they are mentioned as the id ( p prefixed with @ and e prefixed with #) --- lib/event_ds.dart | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/lib/event_ds.dart b/lib/event_ds.dart index bbd20c5..5eef2c7 100644 --- a/lib/event_ds.dart +++ b/lib/event_ds.dart @@ -371,8 +371,28 @@ class EventData { return quote; } } + + String tag = ""; + switch(tags[n][0]) { + case "p": + tag = "@"; + break; + case "e": + tag = "#"; + break; + case "%": // something else for future + tag = "%"; + break; + default: + tag = "@"; + } + + + return tag+mentionedId; + } } + return mentionTag; } if( gDebug > 0) printWarning("In replaceMentions returning nothing");