mirror of
https://github.com/jkingsman/Remote-Terminal-for-MeshCore.git
synced 2026-09-17 00:14:18 +00:00
13 lines
421 B
TypeScript
13 lines
421 B
TypeScript
import type { Channel } from '../types';
|
|
|
|
export const PUBLIC_CHANNEL_KEY = '8B3387E9C5CDEA6AC9E5EDBAA115CD72';
|
|
export const PUBLIC_CHANNEL_NAME = 'Public';
|
|
|
|
export function isPublicChannelKey(key: string): boolean {
|
|
return key.toUpperCase() === PUBLIC_CHANNEL_KEY;
|
|
}
|
|
|
|
export function findPublicChannel(channels: Channel[]): Channel | undefined {
|
|
return channels.find((channel) => isPublicChannelKey(channel.key));
|
|
}
|