fixed bug with memberHelper not processing attached URL

This commit is contained in:
Aster Fialla
2026-02-23 11:35:01 -05:00
parent c752ee2bf2
commit 91e98f2434
2 changed files with 13 additions and 9 deletions

View File

@@ -92,7 +92,7 @@ mh.memberArgumentHandler = async function(authorId, authorFull, isHelp, command
const values = args.slice(2);
// ex: pf;member blah blah
if (command && (memberName && values.length > 0 || newAndRemoveCommands.includes(command) && memberName)) {
if (command && memberName && (values.length > 0 || newAndRemoveCommands.includes(command) || attachmentUrl)) {
return await mh.memberCommandHandler(authorId, command, memberName, values, attachmentUrl, attachmentExpiration).catch((e) => {throw e});
}
else if (memberName && values.length === 0) {

View File

@@ -209,17 +209,19 @@ describe('MemberHelper', () => {
[[mockMember.name, 'new', mockMember.displayname, mockMember.proxy, null], mockMember.propic, attachmentExpiration, 'new'],
[[mockMember.name, 'name', mockMember.name], null, null, 'name'],
[[mockMember.name, 'displayname', mockMember.displayname], null, null, 'displayname'],
//
[[mockMember.name, 'new', mockMember.displayname], null, null, 'new'],
[[mockMember.name, 'new', '', mockMember.proxy], null, null, 'new'],
[[mockMember.name, 'new', '', '', mockMember.propic], null, null, 'new'],
[[mockMember.name, 'new', '', '', null], mockMember.propic, null, 'new'],
[[mockMember.name, 'new', '', '', null], mockMember.propic, attachmentExpiration, 'new'],
//
[[mockMember.name, 'new', '', '', undefined], mockMember.propic, null, 'new'],
[[mockMember.name, 'new', '', '', undefined], mockMember.propic, attachmentExpiration, 'new'],
[[mockMember.name, 'new', '', ''], mockMember.propic, null, 'new'],
[[mockMember.name, 'new', '', ''], mockMember.propic, attachmentExpiration, 'new'],
[[mockMember.name, 'proxy', mockMember.proxy], null, null, 'proxy'],
[[mockMember.name, 'propic', mockMember.propic], null, null, 'propic'],
[[mockMember.name, 'propic', null], mockMember.propic, null, 'propic'],
[[mockMember.name, 'propic', null], mockMember.propic, attachmentExpiration, 'propic'],
[[mockMember.name, 'propic', undefined], mockMember.propic, null, 'propic'],
[[mockMember.name, 'propic', undefined], mockMember.propic, attachmentExpiration, 'propic'],
[[mockMember.name, 'propic'], mockMember.propic, null, 'propic'],
[[mockMember.name, 'propic'], mockMember.propic, attachmentExpiration, 'propic'],
[['remove', mockMember.name], null, null, 'remove'],
[['remove', mockMember.name, 'test'], null, null, 'remove'],
[['new', mockMember.name], null, null, 'new'],
@@ -230,8 +232,10 @@ describe('MemberHelper', () => {
[['new', mockMember.name, undefined, mockMember.displayname, mockMember.proxy, undefined], mockMember.propic, attachmentExpiration, 'new'],
[['new', mockMember.name, '', mockMember.proxy], null, null, 'new'],
[['new', mockMember.name, '', '', mockMember.propic], null, null, 'new'],
[['new', mockMember.name, '', '', null], mockMember.propic, null, 'new'],
[['new', mockMember.name, '', '', null], mockMember.propic, attachmentExpiration, 'new'],
[['new', mockMember.name, '', '', undefined], mockMember.propic, null, 'new'],
[['new', mockMember.name, '', '', undefined], mockMember.propic, attachmentExpiration, 'new'],
[['new', mockMember.name, '', ''], mockMember.propic, null, 'new'],
[['new', mockMember.name, '', ''], mockMember.propic, attachmentExpiration, 'new'],
[['name', mockMember.name, mockMember.name], null, null, 'name'],
[['displayname', mockMember.name, mockMember.name, mockMember.displayname], null, null, 'displayname'],
[['proxy', mockMember.name, mockMember.name, mockMember.displayname, mockMember.proxy], null, null, 'proxy'],