mirror of
https://github.com/hexastack/hexabot
synced 2025-06-26 18:27:28 +00:00
fix: extra check
This commit is contained in:
parent
5ddc257492
commit
72c9484ff6
@ -309,7 +309,7 @@ export default abstract class ChannelHandler<
|
||||
*/
|
||||
public async getPublicUrl(attachment: AttachmentRef | Attachment) {
|
||||
const [name, _suffix] = this.getName().split('-');
|
||||
if ('id' in attachment) {
|
||||
if (attachment && 'id' in attachment) {
|
||||
if (!attachment || !attachment.id) {
|
||||
this.logger.warn('Unable to build public URL: Empty attachment ID');
|
||||
return buildURL(config.apiBaseUrl, `/webhook/${name}/not-found`);
|
||||
|
Loading…
Reference in New Issue
Block a user