aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaria Lisina <sekoohaka.sarisan@gmail.com>2025-08-18 10:37:04 +0500
committerMaria Lisina <sekoohaka.sarisan@gmail.com>2025-08-18 10:37:04 +0500
commit3ad5cb37977fab543ea563ee2490c034dece5a4f (patch)
treed8a10183c040faef843a1c5339367b91291b606f
parent817083e91c182beb2492c7e00e501c8825665df4 (diff)
units/ib_common: Fix parent implementation
Signed-off-by: Maria Lisina <sekoohaka.sarisan@gmail.com>
-rw-r--r--units/ib_common.zsh6
-rw-r--r--units/ib_name.zsh8
2 files changed, 8 insertions, 6 deletions
diff --git a/units/ib_common.zsh b/units/ib_common.zsh
index 6d5e686..af6bc5d 100644
--- a/units/ib_common.zsh
+++ b/units/ib_common.zsh
@@ -20,10 +20,6 @@ then
fi
shift
-elif [[ -n "${ib_parent}" ]]
-then
- output_text="You must specify the Image Board and the parent post ID"
- return 0
else
output_title="Invalid arguments"
output_text="You must specify the Image Board and the post ID or the MD5 hash"
@@ -49,7 +45,7 @@ fi
if [[ -n "${ib_parent}" ]]
then
- ib_query="parent:${ib_post_id} -id:${ib_post_id}"
+ ib_query="parent:${ib_post_id}"
elif [[ ${#ib_post_id} -eq 32 ]]
then
ib_query="md5:${ib_post_id}"
diff --git a/units/ib_name.zsh b/units/ib_name.zsh
index 60fc190..6b89e3e 100644
--- a/units/ib_name.zsh
+++ b/units/ib_name.zsh
@@ -16,7 +16,13 @@ fi
if [[ "${reply_text}" == "null" ]]
then
- output_text="You must specify the Image Board and the post ID or the MD5 hash, or use this command in reply to a message"
+ if [[ -n "${ib_parent}" ]]
+ then
+ output_text="You must specify the Image Board and the parent post ID, or use this command in reply to a message"
+ else
+ output_text="You must specify the Image Board and the post ID or the MD5 hash, or use this command in reply to a message"
+ fi
+
return 0
fi