Skip to content

Commit

Permalink
rename verify action name to rarimo-verify
Browse files Browse the repository at this point in the history
  • Loading branch information
napalmpapalam committed Jan 11, 2024
1 parent 6bc0003 commit a9ca19a
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 13 deletions.
7 changes: 5 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog], and this project adheres to [Semantic Versioning].

## [Unreleased]

## [1.0.4] - 2024-01-11
### Changed
- Update GitHub Action Secret EVN_TESTNET with the received public key
- Rename `/verify` to `/rarimo-verify` action

## [1.0.3] - 2024-01-10
### Added
Expand Down Expand Up @@ -42,7 +44,8 @@ The format is based on [Keep a Changelog], and this project adheres to [Semantic

- Initiated project

[Unreleased]: https://github.com/rarimo/collabland-rarimo-poh-action/compare/1.0.3...HEAD
[Unreleased]: https://github.com/rarimo/collabland-rarimo-poh-action/compare/1.0.4...HEAD
[1.0.4]: https://github.com/rarimo/collabland-rarimo-poh-action/compare/1.0.3...1.0.4
[1.0.3]: https://github.com/rarimo/collabland-rarimo-poh-action/compare/1.0.2...1.0.3
[1.0.2]: https://github.com/rarimo/collabland-rarimo-poh-action/compare/1.0.1...1.0.2
[1.0.1]: https://github.com/rarimo/collabland-rarimo-poh-action/compare/1.0.0...1.0.1
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div align="center"><h1><b>Rarimo Proof of Humanity Collab.Land Action</b></h1></div>

This repo implements an [Collab.Land] action that adds `/verify` command to your Discord server and
This repo implements an [Collab.Land] action that adds `/rarimo-verify` command to your Discord server and
allow members to verify their humanity using the [Rarimo Proof of Humanity] case.

## Table of Contents
Expand Down Expand Up @@ -133,16 +133,16 @@ services:
## Installing the Collab.Land actions
- Follow these steps to install the Collab.Land actions: [Test the Actions in a Discord server]
- Verify your humanity with the `/verify` command
- Verify your humanity with the `/rarimo-verify` command

## API Specifications

- The API exposes two routes per slash command:
- GET `/verify/metadata`: To provide the metadata for the `/verify` command
- POST `/verify/interactions`: To handle the Discord interactions corresponding to the `/verify`
- GET `/verify/metadata`: To provide the metadata for the `/rarimo-verify` command
- POST `/verify/interactions`: To handle the Discord interactions corresponding to the `/rarimo-verify`
command
- The slash commands provide example codes for the following Discord interactions:
- `/verify`: Verify your humanity with Rarimo Proof of Humanity use case and get the verified role
- `/rarimo-verify`: Verify your humanity with Rarimo Proof of Humanity use case and get the verified role
in your Discord server.

## Contributing
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "collabland-rarimo-poh-action",
"description": "Implementation of the Collab.Land action /verify command for the Discord server which allows members to verify their humanity using the Rarimo Proof of Humanity case.",
"version": "1.0.3",
"description": "Implementation of the Collab.Land action /rarimo-verify command for the Discord server which allows members to verify their humanity using the Rarimo Proof of Humanity case.",
"version": "1.0.4",
"private": true,
"license": "MIT",
"author": "Zero Block Global Foundation",
Expand Down
Binary file modified public/thumbnail-discord-verify-msg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion src/app/api/verify/interactions/route.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { handleVerifyAction } from '@/actions'
import { VERIFY_ACTION_NAME } from '@/const'
import { verifyCollablandRequest } from '@/helpers'
import { badRequestAction, unathorizedAction } from '@/http'

Expand All @@ -8,7 +9,7 @@ export const POST = async (request: Request) => {

if (!verifyResult.verified) return unathorizedAction(verifyResult.reason)

if (interaction?.data?.name === 'verify') {
if (interaction?.data?.name === VERIFY_ACTION_NAME) {
return handleVerifyAction(interaction)
}

Expand Down
8 changes: 5 additions & 3 deletions src/const/metadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ const craftPublicImgUrl = (imgName: string): string => {
return new URL(`/${imgName}`, config.appUrl).toString()
}

export const VERIFY_ACTION_NAME = 'rarimo-verify'

const manifest = new MiniAppManifest({
appId: PackageJson.name,
name: 'Proof of Humanity',
Expand Down Expand Up @@ -60,7 +62,7 @@ export const METADATA: DiscordActionMetadata = {
{
// Handle verify <role> slash command
type: InteractionType.ApplicationCommand,
names: ['verify'],
names: [VERIFY_ACTION_NAME],
},
],
/**
Expand All @@ -71,10 +73,10 @@ export const METADATA: DiscordActionMetadata = {
{
metadata: {
name: 'Verify your humanity with Rarimo',
shortName: 'verify',
shortName: VERIFY_ACTION_NAME,
supportedEnvs: ['production', 'development'],
},
name: 'verify',
name: VERIFY_ACTION_NAME,
type: ApplicationCommandType.ChatInput,
description: 'Redirects you to Proof of Humanity DApp for verification',
options: [],
Expand Down

0 comments on commit a9ca19a

Please sign in to comment.