create-message-kit 1.1.5-beta.4 → 1.1.7-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js
CHANGED
package/package.json
CHANGED
@@ -108,7 +108,7 @@ export const getUserInfo = async (
|
|
108
108
|
}),
|
109
109
|
});
|
110
110
|
const converseData = (await response.json()) as ConverseProfile;
|
111
|
-
if (process.env.MSG_LOG)
|
111
|
+
if (process.env.MSG_LOG === "true")
|
112
112
|
console.log("Converse data", keyToUse, converseData);
|
113
113
|
data.converseUsername =
|
114
114
|
converseData?.formattedName || converseData?.name || undefined;
|
@@ -1,16 +1,9 @@
|
|
1
1
|
import { run, HandlerContext } from "@xmtp/message-kit";
|
2
2
|
|
3
|
-
run(
|
4
|
-
|
5
|
-
|
6
|
-
const { content, sender } = context.message;
|
3
|
+
run(async (context: HandlerContext) => {
|
4
|
+
// Get the message and the address from the sender
|
5
|
+
const { content, sender } = context.message;
|
7
6
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
{
|
12
|
-
client: {
|
13
|
-
logging: "debug",
|
14
|
-
},
|
15
|
-
},
|
16
|
-
);
|
7
|
+
// To reply, just call `reply` on the HandlerContext
|
8
|
+
await context.send(`gm`);
|
9
|
+
});
|
@@ -108,7 +108,7 @@ export const getUserInfo = async (
|
|
108
108
|
}),
|
109
109
|
});
|
110
110
|
const converseData = (await response.json()) as ConverseProfile;
|
111
|
-
if (process.env.MSG_LOG)
|
111
|
+
if (process.env.MSG_LOG === "true")
|
112
112
|
console.log("Converse data", keyToUse, converseData);
|
113
113
|
data.converseUsername =
|
114
114
|
converseData?.formattedName || converseData?.name || undefined;
|