fixed where blank kind 1 or 42 were being converted to '+'

as part of wrong reaction processing.
This commit is contained in:
Vishal 2022-11-26 18:10:25 +05:30
parent d6ae371623
commit de187b18a1
2 changed files with 9 additions and 8 deletions

View File

@ -2218,17 +2218,18 @@ class Store {
List<String> validReactionList = ["+", "!"]; // TODO support opposite reactions
List<String> opppositeReactions = ['-', "~"];
if ( event.eventData.content == ""
|| event.eventData.content == "❤️"
|| event.eventData.content == "🙌"
) { // cause damus sends blank reactions, and some send heart emojis
event.eventData.content = "+";
}
if( event.eventData.kind == 7
&& event.eventData.eTags.isNotEmpty) {
if ( event.eventData.content == ""
|| event.eventData.content == "❤️"
|| event.eventData.content == "🙌"
) { // cause damus sends blank reactions, and some send heart emojis
event.eventData.content = "+";
}
if(gDebug > 1) ("Got event of type 7"); // this can be + or !, which means 'hide' event for me
String reactorPubkey = event.eventData.pubkey;
String reactorId = event.eventData.id;

View File

@ -6,7 +6,7 @@ homepage: https://github.com/vishalxl/nostr_console
# Release 0.1.9-beta
# used kind 104
# fix for tag related test fail
# removed debug prints
# removed debug prints
environment:
sdk: '>=2.17.3 <3.0.0'