mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
Update use-publish-reply.ts
This commit is contained in:
@@ -114,14 +114,14 @@ const useReply = ({ cid, subplebbitAddress }: { cid: string; subplebbitAddress:
|
|||||||
const newOptions: Partial<SetReplyStoreData> = {
|
const newOptions: Partial<SetReplyStoreData> = {
|
||||||
subplebbitAddress,
|
subplebbitAddress,
|
||||||
parentCid,
|
parentCid,
|
||||||
content: options.content ?? content,
|
content: options.content === '' ? undefined : options.content ?? content,
|
||||||
link: options.link ?? link,
|
link: options.link === '' ? undefined : options.link ?? link,
|
||||||
spoiler: options.spoiler ?? spoiler,
|
spoiler: options.spoiler ?? spoiler,
|
||||||
displayName: options.displayName ?? author?.displayName ?? account?.author?.displayName,
|
displayName: options.displayName === '' ? undefined : options.displayName ?? author?.displayName ?? account?.author?.displayName,
|
||||||
};
|
};
|
||||||
|
|
||||||
if ('displayName' in options) {
|
if ('displayName' in options) {
|
||||||
newOptions.displayName = options.displayName;
|
newOptions.displayName = options.displayName === '' ? undefined : options.displayName;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (anonMode) {
|
if (anonMode) {
|
||||||
|
|||||||
Reference in New Issue
Block a user