Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on get_reactions #2

Open
tom-lp-at opened this issue Mar 10, 2025 · 0 comments
Open

Error on get_reactions #2

tom-lp-at opened this issue Mar 10, 2025 · 0 comments

Comments

@tom-lp-at
Copy link

tom-lp-at commented Mar 10, 2025

first of all : thx for your hard work ;)
I tested the migration into Mattermost an had an error on get_reactions(rc_message). The Problem was: There is no reaction :)
so i changed the code from

def get_reactions(rc_message):
     mm_reactions = []
     for emoji, users in rc_message.get('reactions', {}).items():
         for username in users['usernames']:
              if username not in IGNORE_USERS:
                  mm_reactions.append(dict( 

to

def get_reactions(rc_message):
     mm_reactions = []
     reaktion = rc_message.get('reactions', {})     # This
     if reaktion is not None:                       # and this
         for emoji, users in reaktion.items():
             for username in users['usernames']:
                if username not in IGNORE_USERS:
                    mm_reactions.append(dict(

to clarify: i get the reaction and check if it is other then None.
Thats it...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant