Skip to content

Commit

Permalink
fix(telegram): adaptMessageMeta shouldn't override subtype (#93)
Browse files Browse the repository at this point in the history
  • Loading branch information
Anillc authored Apr 1, 2023
1 parent a5076c4 commit 9f7f6c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions adapters/telegram/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ export function adaptMessageMeta(session: Session, message: Telegram.Message) {
if (!message) return
session.messageId = message.message_id.toString()
if (message.chat.type === 'private') {
session.subtype = 'private'
session.subtype ||= 'private'
session.channelId = 'private:' + message.chat.id
} else {
session.subtype = 'group'
session.subtype ||= 'group'
session.guildId = message.chat.id.toString()
if (message.is_topic_message) {
session.channelId = message.message_thread_id.toString()
Expand Down

0 comments on commit 9f7f6c7

Please sign in to comment.