mirror of
https://github.com/zjs81/meshcore-open.git
synced 2026-04-20 22:13:48 +00:00
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:
parent
3fdd8f5eaf
commit
4003519deb
1 changed files with 3 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue