File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -214,9 +214,22 @@ def get_emoji_reactions_pathes(self):
214214 reactions_pathes = []
215215 for child in walk_children (self .object ):
216216 if getattr (child , 'id' , '' ) == 'reactionDelegate' :
217+ # Search for StatusIcon inside reactionDelegate and extract emoji ID from icon path
217218 for item in walk_children (child ):
218- if getattr (item , 'objectName' , '' ) == 'emojiReaction' :
219- reactions_pathes .append (item .emojiId )
219+ icon_path = None
220+ if hasattr (item , 'icon' ):
221+ icon_path = str (item .icon )
222+ elif hasattr (item , 'source' ):
223+ icon_path = str (item .source )
224+
225+ if icon_path :
226+ # Extract emoji ID from path like "qrc:/assets/twemoji/svg/1f600.svg"
227+ match = re .search (r'/([a-f0-9]+)\.svg' , icon_path )
228+ if match :
229+ reactions_pathes .append (match .group (1 ))
230+ break
231+ if not reactions_pathes :
232+ raise LookupError ('No emoji reactions found for this message' )
220233 return reactions_pathes
221234
222235
You can’t perform that action at this time.
0 commit comments