-
-
Notifications
You must be signed in to change notification settings - Fork 274
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
Fetch realm emoji in initial register call & update using events #809
Comments
I am new to the codebase and this is my first issue.
When a client starts up, a call to |
@mkp6781 What you've described should replace the existing code and is related to the first part of this issue (title - the second bullet). The second part (of title, the first bullet) - "update using events" - requires an event handler for that event type to update them as emoji are added and removed on the server, so that the application retains a current list. |
def _handle_update_emoji_event(self, event: Event) -> None:
"""
Handle update of emoji
"""
realm_emojis = event['realm_emoji']
self.active_emoji_data.update(realm_emojis) This is the event handler code. However when I run pytest, it gives me a 'key error' saying no key 'realm_emoji'. Should I make any more changes to pass the tests? |
The https://zulip.com/api/get-events#realm_emoji-update You're just quoting a function here so I'm not sure what else you've written, but note that this method won't be triggered unless you map the function to the name of the event type, as with the other event handlers. Also note that you likely need to adjust the event data to understand what change to make to the emoji data. |
Pull request. #825 |
Pull request #827 |
Hi @neiljp I am new to the codebase and this is my first issue. Could you please elaborate a bit what the issue is? |
I have updated the pr. #827 |
@zulipbot claim |
@Ezio-Sarthak Someone is already working on this right now - have a look at other issues, explore the application and see what you think could be improved, and come and have a chat on chat.zulip.org in #zulip-terminal :) |
@neiljp Yeah sure, thanks! |
@zulipbot add "PR needs review" |
This commit adds event handler for update of realm emoji within a ZT session. The generate_all_emoji_data() function unpacks the three emoji dictionaries in the priority order given by zulip extra emoji>realm emoji>unicode emoji Tests added. Fixes zulip#809
This commit adds event handler for update of realm emoji within a ZT session. The generate_all_emoji_data() function unpacks the three emoji dictionaries in the priority order given by zulip extra emoji>realm emoji>unicode emoji Tests added. Fixes zulip#809
This commit adds event handler for update of realm emoji within a ZT session. The generate_all_emoji_data() function unpacks the three emoji dictionaries in the priority order given by zulip extra emoji>realm emoji>unicode emoji Tests added. Fixes zulip#809
This commit adds event handler for update of realm emoji within a ZT session. The generate_all_emoji_data() function unpacks the three emoji dictionaries in the priority order given by zulip extra emoji>realm emoji>unicode emoji Tests added. Fixes zulip#809
This commit adds event handler for update of realm emoji within a ZT session. The generate_all_emoji_data() function unpacks the three emoji dictionaries in the priority order given by zulip extra emoji>realm emoji>unicode emoji Tests added. Fixes zulip#809
This commit adds event handler for update of realm emoji within a ZT session. The generate_all_emoji_data() function unpacks the three emoji dictionaries in the priority order given by zulip extra emoji>realm emoji>unicode emoji Tests added. Fixes zulip#809
This commit adds event handler for update of realm emoji within a ZT session. The generate_all_emoji_data() function unpacks the three emoji dictionaries in the priority order given by zulip extra emoji>realm emoji>unicode emoji Tests added. Fixes zulip#809
This commit adds event handler for update of realm emoji within a ZT session. The generate_all_emoji_data() function unpacks the three emoji dictionaries in the priority order given by zulip extra emoji>realm emoji>unicode emoji Tests added. Fixes zulip#809
This commit adds event handler for update of realm emoji within a ZT session. The generate_all_emoji_data() function unpacks the three emoji dictionaries in the priority order given by zulip extra emoji>realm emoji>unicode emoji Tests added. Fixes zulip#809
This commit adds event handler for update of realm emoji within a ZT session. The generate_all_emoji_data() function unpacks the three emoji dictionaries in the priority order given by zulip extra emoji>realm emoji>unicode emoji Tests added. Fixes zulip#809
@zulipbot add "PR needs review" |
This commit adds event handler for update of realm emoji within a ZT session. The generate_all_emoji_data() function unpacks the three emoji dictionaries in the priority order given by zulip extra emoji>realm emoji>unicode emoji Tests added. Fixes zulip#809
This commit adds event handler for update of realm emoji within a ZT session. The generate_all_emoji_data() function unpacks the three emoji dictionaries in the priority order given by zulip extra emoji>realm emoji>unicode emoji Tests added. Fixes zulip#809
This commit adds event handler for update of realm emoji within a ZT session. The generate_all_emoji_data() function unpacks the three emoji dictionaries in the priority order given by zulip extra emoji>realm emoji>unicode emoji Tests added. Fixes zulip#809
This commit adds event handler for update of realm emoji within a ZT session. The generate_all_emoji_data() function unpacks the three emoji dictionaries in the priority order given by zulip extra emoji>realm emoji>unicode emoji Tests added. Fixes zulip#809
This commit adds event handler for update of realm emoji within a ZT session. Tests added. Fixes zulip#809.
We have preliminary support for realm emoji (custom emoji specific to an organization) via #710, but this has a few caveats (though perhaps minor, depending on the frequency of adding custom emoji vs each ZT session):
Working on this issue is a fairly good introduction to how the Zulip events API works. You'll likely want to review the events in the zulip documentation and existing code in
model.py
, which is where event handling occurs.The text was updated successfully, but these errors were encountered: