mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-nostr.git
synced 2026-01-29 08:53:18 +00:00
voting system with nostr added
This commit is contained in:
@@ -17,6 +17,14 @@ trait NostrFetcherTrait
|
||||
{
|
||||
$hex = collect([]);
|
||||
foreach ($npubs as $item) {
|
||||
// check if $item is already a hex string
|
||||
if (preg_match('/^[0-9a-fA-F]+$/', $item)) {
|
||||
$hex->push([
|
||||
'hex' => $item,
|
||||
'npub' => (new Key)->convertPublicKeyToBech32($item),
|
||||
]);
|
||||
continue;
|
||||
}
|
||||
$hex->push([
|
||||
'hex' => (new Key)->convertToHex($item),
|
||||
'npub' => $item,
|
||||
|
||||
Reference in New Issue
Block a user