khatru: SendNotice() util.
This commit is contained in:
@@ -59,3 +59,7 @@ func GetIP(ctx context.Context) string {
|
|||||||
func GetSubscriptionID(ctx context.Context) string {
|
func GetSubscriptionID(ctx context.Context) string {
|
||||||
return ctx.Value(subscriptionIdKey).(string)
|
return ctx.Value(subscriptionIdKey).(string)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func SendNotice(ctx context.Context, msg string) {
|
||||||
|
GetConnection(ctx).WriteJSON(nostr.NoticeEnvelope(msg))
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user