(text: string)
| 64 | } |
| 65 | |
| 66 | function getMentionIndex(text: string) { |
| 67 | const index1 = text.lastIndexOf('!'); |
| 68 | const index2 = text.lastIndexOf('@'); |
| 69 | const indexes = [index1, index2]; |
| 70 | return Math.max.apply(Math, indexes) + 1; |
| 71 | } |
| 72 | |
| 73 | function isMentionMode(message: string, position: number) { |
| 74 | const current = message[position - 1]; |