Compat with latest JS lib
This commit is contained in:
@@ -17,11 +17,12 @@ export const MessageInput = ({ channel }: MessageInputProps): JSX.Element => {
|
||||
|
||||
const sendText = async (message: string) => {
|
||||
await connection
|
||||
?.sendText({
|
||||
text: message,
|
||||
wantAck: true,
|
||||
channel: channel.config.index as Types.ChannelNumber
|
||||
})
|
||||
?.sendText(
|
||||
message,
|
||||
"broadcast",
|
||||
true,
|
||||
channel.config.index as Types.ChannelNumber
|
||||
)
|
||||
.then((id) => setMessageState(channel.config.index, id, "ack"))
|
||||
.catch((e: Types.PacketError) =>
|
||||
setMessageState(channel.config.index, e.id, e.error)
|
||||
|
||||
@@ -31,15 +31,15 @@ export const NewLocationMessage = (): JSX.Element => {
|
||||
<Input label="Coordinates" />
|
||||
<Button
|
||||
onClick={() => {
|
||||
void connection?.sendWaypoint({
|
||||
waypoint: Protobuf.Waypoint.create({
|
||||
void connection?.sendWaypoint(
|
||||
new Protobuf.Waypoint({
|
||||
latitudeI: Math.floor(3.89103 * 1e7),
|
||||
longitudeI: Math.floor(105.87005 * 1e7),
|
||||
name: "TEST",
|
||||
description: "This is a description"
|
||||
}),
|
||||
destination: "broadcast"
|
||||
});
|
||||
"broadcast"
|
||||
);
|
||||
}}
|
||||
>
|
||||
Send
|
||||
|
||||
Reference in New Issue
Block a user