Skip to content

Commit

Permalink
fix docs
Browse files Browse the repository at this point in the history
  • Loading branch information
piloking committed Sep 15, 2024
1 parent d4d23d0 commit b9bfb9c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions archive/_server/Message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ export class Message {
public id: string;
public createdTime: Date;
public text: string;
public content: string;

constructor(options: {
operation?: LINETypes.Operation
Expand Down Expand Up @@ -165,6 +166,7 @@ export class Message {
this.createdTime = new Date(this.rawMessage.createdTime)
this.id = this.rawMessage.id
if (this.rawMessage.text) {
this.content = this.rawMessage.text
this.text = this.rawMessage.text
}
this.contentMetadata = {}
Expand Down Expand Up @@ -244,8 +246,8 @@ export class Message {
})
let lastSplit = 0;
splits.sort((a, b) => a.start - b.start).forEach(e => {
texts.push({ text: this.text.substring(lastSplit, e.start) })
const content: decorationText = { text: this.text.substring(e.start, e.end) }
texts.push({ text: this.content.substring(lastSplit, e.start) })
const content: decorationText = { text: this.content.substring(e.start, e.end) }
if (typeof e.emoji === "number") {
const emoji = emojiData.REPLACE.sticon.resources[e.emoji]
const url = `https://stickershop.line-scdn.net/sticonshop/v1/sticon/${emoji.productId}/android/${emoji.sticonId}.png`
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/start-2.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ It's easy.  
All you have to do is call the client's method as follows.

```ts
import { Client } from "../packages/client/index.ts";
import { Client } from "@evex/linejs";

const client = new Client();

Expand Down

0 comments on commit b9bfb9c

Please sign in to comment.