Add helper method for parsing nostr event tags

This commit is contained in:
2024-04-16 19:10:48 +02:00
parent bc43082839
commit 77e2fe5792
2 changed files with 10 additions and 2 deletions

View File

@@ -1,4 +1,11 @@
require "nostr"
class NostrManagerService < ApplicationService
def parse_tags(tags)
out = {}
tags.each do |tag|
out[tag[0].to_sym] = tag[1, tag.length]
end
out
end
end