Fix a bug in the send_local_online_presence_to module API (#14880)

Destination was being used incorrectly (a single destination instead
of a list of destinations was being passed).

This also updates some of the types in the area to not use Collection[str],
which is a footgun.
This commit is contained in:
Patrick Cloke 2023-01-25 16:34:37 -05:00 committed by GitHub
parent 3c3ba31507
commit 7e8d455280
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 19 additions and 11 deletions

View file

@ -12,9 +12,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from typing import Collection, Generic, List, Optional, Tuple, TypeVar
from typing import Generic, List, Optional, Tuple, TypeVar
from synapse.types import UserID
from synapse.types import StrCollection, UserID
# The key, this is either a stream token or int.
K = TypeVar("K")
@ -28,7 +28,7 @@ class EventSource(Generic[K, R]):
user: UserID,
from_key: K,
limit: int,
room_ids: Collection[str],
room_ids: StrCollection,
is_guest: bool,
explicit_room_id: Optional[str] = None,
) -> Tuple[List[R], K]: