~tomtom/damus

bb680be9b740661b51dd7e8882ff29efbcc56cc6 — Thomas Mathews a month ago 7c4274e
Fix issue with posting reactions.
1 files changed, 5 insertions(+), 3 deletions(-)

M js/core.js
M js/core.js => js/core.js +5 -3
@@ 138,12 138,14 @@ function new_reply_tags(ev) {

async function create_reply(pubkey, content, ev, all=true) {
	let kind = ev.kind;
	// convert emoji replies into reactions
	let tags = [];
	if (is_valid_reaction_content(content)) {
		// convert emoji replies into reactions
		kind = KIND_REACTION;
		tags.push(["e", ev.id], ["p", ev.pubkey]);
	} else {
		tags = all ? gather_reply_tags(pubkey, ev) : new_reply_tags(ev);
	}
	const tags = kind != KIND_REACTION && all 
		? gather_reply_tags(pubkey, ev) : new_reply_tags(ev);
	const created_at = new_creation_time();
	let reply = { 
		pubkey,