Merge pull request #59 from 446564/community-#-names

add community to hashtag channel name
This commit is contained in:
Ded 2026-02-03 20:08:42 -08:00 committed by GitHub
commit 488a286701
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1046,10 +1046,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 {
@ -1068,8 +1069,8 @@ class _ChannelsScreenState extends State<ChannelsScreen>
);
return;
}
psk = selectedCommunity!
.deriveCommunityHashtagPsk(hashtag);
channelName = '${selectedCommunity!.name} #$hashtag';
psk = selectedCommunity!.deriveCommunityHashtagPsk(hashtag);
// Track in community's hashtag list
await _communityStore.addHashtagChannel(
selectedCommunity!.id,