Skip to content

Commit

Permalink
fix some bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
williamhorning committed Jul 11, 2024
1 parent 142be4e commit 3ad21a9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/bolt-guilded/guilded.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export async function convert_msg(

function get_valid_username(msg: message) {
function valid(e: string) {
if (!e || e.length === 0 || e.length > 32) return false;
if (!e || e.length === 0 || e.length > 25) return false;
return /^[a-zA-Z0-9_ ()-]*$/gms.test(e);
}

Expand Down
2 changes: 1 addition & 1 deletion packages/lightning/src/bridges/handle_message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export async function handle_message(
if (type !== 'create_message' && bridge.allow_editing !== true) return;

const channels = bridge.channels.filter(
(i) => i.id !== msg.channel && i.plugin !== msg.plugin,
(i) => i.id !== msg.channel || i.plugin !== msg.plugin,
);

if (channels.length < 1) return;
Expand Down

0 comments on commit 3ad21a9

Please sign in to comment.