Skip to content

Commit

Permalink
feat: Convert Emjo to unicode
Browse files Browse the repository at this point in the history
  • Loading branch information
noahonyejese committed Sep 19, 2024
1 parent 06e314e commit 2d703d1
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/api/slack/events/conversations/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { verifySlackRequest } from '@/server/security';
import { newError } from '@/utils/error-handling';
import admin from 'firebase-admin';
import { NextRequest, NextResponse } from 'next/server';
import emoji from 'node-emoji';

export const POST = async (req: NextRequest) => {
try {
Expand Down Expand Up @@ -40,9 +41,10 @@ export const POST = async (req: NextRequest) => {

if (userData) {
// Update the last reaction timestamp
const reactionEmoji = emoji.get(event.reaction) || event.reaction;
await userRef.update({
...userData,
lastReaction: event.reaction,
lastReaction: reactionEmoji,
});
}

Expand Down
64 changes: 64 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"firebase-admin": "^12.4.0",
"framer-motion": "^11.5.4",
"next": "14.2.8",
"node-emoji": "^2.1.3",
"noisejs": "^2.1.0",
"react": "^18",
"react-dom": "^18",
Expand Down

0 comments on commit 2d703d1

Please sign in to comment.