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

Sliding Sync: Return room tags in account data extension #17707

Merged

Conversation

MadLittleMods
Copy link
Contributor

@MadLittleMods MadLittleMods commented Sep 13, 2024

Return room tags in account data extension

The account data extension was also updated to avoid copies when we pull the data out of the cache.

Fix #17694

Dev notes

Sync v2 incremental sync response with some rooms tags in the account data (favouriting a room)
{
    "next_batch": "s5241945698_757284974_2782863_3110944073_3359903529_260642965_1380548560_11007322260_0_338462",
    "device_one_time_keys_count": {
        "signed_curve25519": 50
    },
    "org.matrix.msc2732.device_unused_fallback_key_types": [
        "signed_curve25519"
    ],
    "device_unused_fallback_key_types": [
        "signed_curve25519"
    ],
    "rooms": {
        "join": {
            "!xxx:matrix.org": {
                "timeline": {
                    "events": [],
                    "prev_batch": "s5241945695_757284974_2782854_3110944063_3359903514_260642965_1380548559_11007322258_0_338462",
                    "limited": false
                },
                "state": {
                    "events": []
                },
                "account_data": {
                    "events": [
                        {
                            "type": "m.tag",
                            "content": {
                                "tags": {
                                    "m.favourite": {}
                                }
                            }
                        }
                    ]
                },
                "ephemeral": {
                    "events": []
                },
                "unread_notifications": {
                    "notification_count": 0,
                    "highlight_count": 0
                },
                "summary": {}
            }
        }
    }
}

ChainMap

DeepChainMap example in the Python docs: https://docs.python.org/3/library/collections.html

aka NestedChainMap

Pull Request Checklist

  • Pull request is based on the develop branch
  • Pull request includes a changelog file. The entry should:
    • Be a short description of your change which makes sense to users. "Fixed a bug that prevented receiving messages from other servers." instead of "Moved X method from EventStore to EventWorkerStore.".
    • Use markdown where necessary, mostly for code blocks.
    • End with either a period (.) or an exclamation mark (!).
    • Start with a capital letter.
    • Feel free to credit yourself, by adding a sentence "Contributed by @github_username." or "Contributed by [Your Name]." to the end of the entry.
  • Code style is correct
    (run the linters)

@MadLittleMods MadLittleMods marked this pull request as ready for review September 13, 2024 03:20
@MadLittleMods MadLittleMods requested a review from a team as a code owner September 13, 2024 03:20
@MadLittleMods MadLittleMods merged commit 03937a1 into develop Sep 16, 2024
39 checks passed
@MadLittleMods MadLittleMods deleted the madlittlemods/17694-room-tags-in-account-data-extension branch September 16, 2024 18:47
@MadLittleMods
Copy link
Contributor Author

Thanks for the review @devonh 🐏

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

Successfully merging this pull request may close these issues.

Sliding sync: return room tags in account data extension
2 participants