fabianonline / telegram_backup

Java app to download all your telegram data.
GNU General Public License v3.0
450 stars 91 forks source link

Supergroups are always recognized as Channels (and because of that sender_id is always empty in supergroup messages) #69

Closed CTassisF closed 6 years ago

CTassisF commented 6 years ago

Following the v1.1.0 update I noticed that supergroups are always recognized as channels and because of that the sender_id attribute of the table messages is always empty when that message is from a supergroup.

According to the following code, it was supposed to be empty only when that message comes from a channel: https://github.com/fabianonline/telegram_backup/blob/2321fa11eec72ec9d3d7d3e8fd2b774f6c1f4c84/src/main/java/de/fabianonline/telegram_backup/Database.java#L216-L221 It may still be possible to get the sender_id from channels though when "sign messages" is enabled for that channel.

I guess this is happening because supergroups are in fact channels with the megagroup attribute set to true.

fabianonline commented 6 years ago

Thanks. Fixed this in code. The fix will be included in the next release.

CTassisF commented 6 years ago

Thanks! By the way, I think the data saved in the chats table still saves supergroups as channels.