Allow sharing something to chat without a message
This commit is contained in:
parent
8f56812dd1
commit
8ef4b21dab
3 changed files with 8 additions and 2 deletions
|
|
@ -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}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue