Skip to content

Commit

Permalink
adjustments.
Browse files Browse the repository at this point in the history
  • Loading branch information
AmarnathCJD committed Aug 10, 2024
1 parent 21caa5b commit 58042fb
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions telegram/newmessage.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ func (m *NewMessage) ChatType() string {
case *PeerChat:
return EntityChat
case *PeerChannel:
if !m.Channel.Broadcast {
if m.Channel != nil && !m.Channel.Broadcast {
return EntityChat
}
return EntityChannel
Expand All @@ -146,9 +146,6 @@ func (m *NewMessage) E(obj any, err error) error {
}

func (m *NewMessage) IsGroup() bool {
if m.Channel != nil {
return m.ChatType() == EntityChat || (m.ChatType() == EntityChannel && !m.Channel.Broadcast)
}
return m.ChatType() == EntityChat
}

Expand Down

0 comments on commit 58042fb

Please sign in to comment.