aboutsummaryrefslogtreecommitdiffstats
path: root/src/dm.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/dm.js')
-rw-r--r--src/dm.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/dm.js b/src/dm.js
index 1e568a7..c610aa3 100644
--- a/src/dm.js
+++ b/src/dm.js
@@ -72,12 +72,13 @@ export function makeDMRumor(senderPk, peerPk, text, extraTags = []) {
// A reaction to a DM: a kind 7 rumor riding the same gift-wrap envelope
// (the shape 0xchat and friends use), e-tagging the reacted message.
-export function makeDMReaction(senderPk, peerPk, targetId, emoji) {
+// extraTags: a NIP-30 ["emoji", code, url] when the reaction is a :code:
+export function makeDMReaction(senderPk, peerPk, targetId, emoji, extraTags = []) {
const rumor = {
kind: 7,
pubkey: senderPk,
content: emoji,
- tags: [['p', peerPk], ['e', targetId]],
+ tags: [['p', peerPk], ['e', targetId], ...extraTags],
created_at: now(),
};
rumor.id = getEventHash(rumor);