Allow sharing something to chat without a message
This commit is contained in:
@@ -68,8 +68,6 @@
|
||||
const content = ed.getText({blockSeparator: "\n"}).trim()
|
||||
const tags = ed.storage.nostr.getEditorTags()
|
||||
|
||||
if (!content) return
|
||||
|
||||
onSubmit({content, tags})
|
||||
|
||||
draftKey?.clear()
|
||||
|
||||
@@ -156,6 +156,10 @@
|
||||
}
|
||||
|
||||
const onSubmit = async ({content, tags}: EventContent) => {
|
||||
if (!content && !share) {
|
||||
return
|
||||
}
|
||||
|
||||
try {
|
||||
tags.push(["h", h])
|
||||
|
||||
|
||||
@@ -57,6 +57,10 @@
|
||||
}
|
||||
|
||||
const onSubmit = async ({content, tags}: EventContent) => {
|
||||
if (!content && !share) {
|
||||
return
|
||||
}
|
||||
|
||||
try {
|
||||
let template: EventContent & {created_at?: number} = {content, tags}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user