File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -1724,6 +1724,8 @@ func (m *Messenger) Init() error {
1724
1724
if err != nil {
1725
1725
return err
1726
1726
}
1727
+
1728
+ communityInfo := make (map [string ]* communities.Community )
1727
1729
for _ , chat := range chats {
1728
1730
if err := chat .Validate (); err != nil {
1729
1731
logger .Warn ("failed to validate chat" , zap .Error (err ))
@@ -1740,20 +1742,13 @@ func (m *Messenger) Init() error {
1740
1742
continue
1741
1743
}
1742
1744
1743
- communityInfo := make (map [string ]* communities.Community )
1744
-
1745
1745
switch chat .ChatType {
1746
1746
case ChatTypePublic , ChatTypeProfile :
1747
1747
filtersToInit = append (filtersToInit , transport.FiltersToInitialize {ChatID : chat .ID })
1748
1748
case ChatTypeCommunityChat :
1749
- communityID , err := hexutil .Decode (chat .CommunityID )
1750
- if err != nil {
1751
- return err
1752
- }
1753
-
1754
1749
community , ok := communityInfo [chat .CommunityID ]
1755
1750
if ! ok {
1756
- community , err = m .communitiesManager .GetByID ( communityID )
1751
+ community , err = m .communitiesManager .GetByIDString ( chat . CommunityID )
1757
1752
if err != nil {
1758
1753
return err
1759
1754
}
You can’t perform that action at this time.
0 commit comments