mirror of
https://github.com/vishalxl/nostr_console.git
synced 2025-11-18 18:07:48 +01:00
ensured that even if a user does not have a kind 0 event..
.. even then their pubkey is stored in the gKind0 store, so that their profile can still be looked up with profile view in 6 -> 1
This commit is contained in:
@@ -304,7 +304,7 @@ class EventData {
|
|||||||
|
|
||||||
String expandMentions(String content) {
|
String expandMentions(String content) {
|
||||||
if( id == gCheckEventId) {
|
if( id == gCheckEventId) {
|
||||||
printInColor("in expandMentions: decoding ee810ea73072af056cceaa6d051b4fcce60739247f7bcc752e72fa5defb64f09\n", redColor);
|
printInColor("in expandMentions: decoding $gCheckEventId\n", redColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
if( tags.isEmpty) {
|
if( tags.isEmpty) {
|
||||||
@@ -335,7 +335,7 @@ class EventData {
|
|||||||
// is called only once for each event received ( or read from file)
|
// is called only once for each event received ( or read from file)
|
||||||
void translateAndExpandMentions(List<DirectMessageRoom> directRooms, Map<String, Tree> tempChildEventsMap) {
|
void translateAndExpandMentions(List<DirectMessageRoom> directRooms, Map<String, Tree> tempChildEventsMap) {
|
||||||
if( id == gCheckEventId) {
|
if( id == gCheckEventId) {
|
||||||
printInColor("in translateAndExpandMensitons: decoding ee810ea73072af056cceaa6d051b4fcce60739247f7bcc752e72fa5defb64f09\n", redColor);
|
printInColor("in translateAndExpandMensitons: decoding $gCheckEventId\n", redColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (content == "" || evaluatedContent != "") {
|
if (content == "" || evaluatedContent != "") {
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ int gSpecificDebug = 0;
|
|||||||
final log = Logger('ExampleLogger');
|
final log = Logger('ExampleLogger');
|
||||||
|
|
||||||
// for debugging
|
// for debugging
|
||||||
String gCheckEventId = "fg ee810ea73072af056cceaa6d051b4fcce60739247f7bcc752e72fa5defb64f09";
|
String gCheckEventId = " e74e93fbc77af5275f29db688931f725813ab1385f16233bfa609078a8779dfa";
|
||||||
|
|
||||||
int gDefaultNumWaitSeconds = 6000; // is used in main()
|
int gDefaultNumWaitSeconds = 6000; // is used in main()
|
||||||
|
|
||||||
|
|||||||
@@ -852,6 +852,7 @@ class Store {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(tree.event.eventData.eTags.isNotEmpty ) {
|
if(tree.event.eventData.eTags.isNotEmpty ) {
|
||||||
|
|
||||||
// is not a parent, find its parent and then add this element to that parent Tree
|
// is not a parent, find its parent and then add this element to that parent Tree
|
||||||
String parentId = tree.event.eventData.getParent(tempChildEventsMap);
|
String parentId = tree.event.eventData.getParent(tempChildEventsMap);
|
||||||
|
|
||||||
@@ -874,9 +875,12 @@ class Store {
|
|||||||
topLevelTrees.add(dummyTopNode);
|
topLevelTrees.add(dummyTopNode);
|
||||||
|
|
||||||
// dont add this dummy in dummyEventIds list ( cause that's used to fetch events not in store)
|
// dont add this dummy in dummyEventIds list ( cause that's used to fetch events not in store)
|
||||||
if( gDebug > 0) log.info("In Tree.fromEvents: got a kind 1 event whose parent is not a type 1 post: $newEventId . parent kind: ${tempChildEventsMap[parentId]?.event.eventData.kind}");
|
|
||||||
} else {
|
} else {
|
||||||
tempChildEventsMap[parentId]?.children.add(tree);
|
tempChildEventsMap[parentId]?.children.add(tree);
|
||||||
|
|
||||||
|
if( !gKindONames.containsKey(tree.event.eventData.pubkey)) {
|
||||||
|
gKindONames[tree.event.eventData.pubkey] = UserNameInfo(null, null, null, null, null );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// in case where the parent of the new event is not in the pool of all events,
|
// in case where the parent of the new event is not in the pool of all events,
|
||||||
@@ -929,7 +933,7 @@ class Store {
|
|||||||
// get dummy events
|
// get dummy events
|
||||||
sendEventsRequest(gListRelayUrls1, dummyEventIds);
|
sendEventsRequest(gListRelayUrls1, dummyEventIds);
|
||||||
|
|
||||||
//log.info("In fromEvents After calling SendEventsRequest for ${dummyEventIds.length} dummy evnets");
|
//log.info("In fromEvents After calling SendEventsRequest for ${dummyEventIds.length} dummy evnets ids: $dummyEventIds");
|
||||||
|
|
||||||
// create a dummy top level tree and then create the main Tree object
|
// create a dummy top level tree and then create the main Tree object
|
||||||
return Store( topLevelTrees, tempChildEventsMap, tempWithoutParent, channels, encryptedChannels, tempDirectRooms);
|
return Store( topLevelTrees, tempChildEventsMap, tempWithoutParent, channels, encryptedChannels, tempDirectRooms);
|
||||||
|
|||||||
Reference in New Issue
Block a user