add community to hashtag channel name

brings behavior in line with community public channels and prefixes the community name

this allows users to use the same radio with multiple clients and be able to tell which
hashtag channel they are using i.e. Scouts #leaders, where previous it was just a private
chanel named #leaders.
This commit is contained in:
446564 2026-01-20 15:26:41 -08:00
parent 3fdd8f5eaf
commit 4003519deb

View file

@ -917,10 +917,11 @@ class _ChannelsScreenState extends State<ChannelsScreen>
if (hashtag.startsWith('#')) {
hashtag = hashtag.substring(1);
}
final channelName = '#$hashtag';
final String channelName;
final Uint8List psk;
if (isRegularHashtag) {
channelName = '#$hashtag';
// Regular hashtag - public derivation using SHA256
psk = Channel.derivePskFromHashtag(hashtag);
} else {
@ -931,6 +932,7 @@ class _ChannelsScreenState extends State<ChannelsScreen>
);
return;
}
channelName = '${selectedCommunity!.name} #$hashtag';
psk = selectedCommunity!.deriveCommunityHashtagPsk(hashtag);
// Track in community's hashtag list
await _communityStore.addHashtagChannel(selectedCommunity!.id, hashtag);