mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 14:03:30 +00:00
event_queue: Convert users argument of send_event to list.
set is not JSON serializable, and orjson enforces this. Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
fe5c524890
commit
25c20a21bd
@@ -429,7 +429,7 @@ class BotTest(ZulipTestCase, UploadSerializeMixin):
|
|||||||
),
|
),
|
||||||
event['event'],
|
event['event'],
|
||||||
)
|
)
|
||||||
self.assertEqual(event['users'], {user_profile.id})
|
self.assertEqual(event['users'], [user_profile.id])
|
||||||
|
|
||||||
def test_add_bot_with_default_sending_stream_private_denied(self) -> None:
|
def test_add_bot_with_default_sending_stream_private_denied(self) -> None:
|
||||||
self.login('hamlet')
|
self.login('hamlet')
|
||||||
@@ -504,7 +504,7 @@ class BotTest(ZulipTestCase, UploadSerializeMixin):
|
|||||||
),
|
),
|
||||||
event['event'],
|
event['event'],
|
||||||
)
|
)
|
||||||
self.assertEqual(event['users'], {user_profile.id})
|
self.assertEqual(event['users'], [user_profile.id])
|
||||||
|
|
||||||
def test_add_bot_with_default_events_register_stream_private_denied(self) -> None:
|
def test_add_bot_with_default_events_register_stream_private_denied(self) -> None:
|
||||||
self.login('hamlet')
|
self.login('hamlet')
|
||||||
|
|||||||
@@ -1184,5 +1184,5 @@ def send_event(realm: Realm, event: Mapping[str, Any],
|
|||||||
the user/message pair."""
|
the user/message pair."""
|
||||||
port = get_tornado_port(realm)
|
port = get_tornado_port(realm)
|
||||||
queue_json_publish(notify_tornado_queue_name(port),
|
queue_json_publish(notify_tornado_queue_name(port),
|
||||||
dict(event=event, users=users),
|
dict(event=event, users=list(users)),
|
||||||
lambda *args, **kwargs: send_notification_http(realm, *args, **kwargs))
|
lambda *args, **kwargs: send_notification_http(realm, *args, **kwargs))
|
||||||
|
|||||||
Reference in New Issue
Block a user