-
Notifications
You must be signed in to change notification settings - Fork 23
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
Who Added Me #614
Merged
+190
−18
Merged
Who Added Me #614
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
977176f
StagedWelcome Setup
zombieobject 397096b
Create StagedWelcome & Obtain Sender Creds
zombieobject b7d9431
Store Welcome Sender’s Identity on Group
zombieobject 3257ef4
Remove Extra Constructor
zombieobject 09cca4c
Use Account Address Instead of Credential
zombieobject 520ebe1
Update schema to use added_by_address
zombieobject 1519f2b
Update StoredGroup to use added_by_address
zombieobject 8ebeb1a
Pass in account_address during group creation
zombieobject c8c54dd
Updated DB Fetch
zombieobject 292a24f
E2E Who Added Me Test Including CRUD
zombieobject 0bed242
Remove Developement Use of “Expect”
zombieobject 76f08d0
Update FfiGroup to use added_by_address
zombieobject 9aa969d
Initial Bindings Test
zombieobject a1f58c0
Formatting Cleanup
zombieobject 0f83abd
Address Linter Finding
zombieobject 91d850d
get_group_member helper on FfiXmtpClient
zombieobject c0871f8
Address Lint Findings
zombieobject ee1901c
Fix Flakey Test
zombieobject 3fc71ca
Revert back to added_by_address
zombieobject a795b0f
Revert Flaky Test Changes
zombieobject e75d5c0
Use Conversation Values
zombieobject File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
xmtp_mls/migrations/2024-04-08-180113_group_added_by_address/down.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
-- As SQLite does not support ALTER, we play this game of move, repopulate, drop. Here we recreate without the 'added_by_address' column. | ||
BEGIN TRANSACTION; | ||
CREATE TEMPORARY TABLE backup_group(id BLOB PRIMARY KEY NOT NULL, created_at_ns BIGINT NOT NULL, membership_state INT NOT NULL, installations_last_checked BIGINT NOT NULL, purpose INT NOT NULL DEFAULT 1); | ||
INSERT INTO backup_group SELECT id, created_at_ns, membership_state, installations_last_checked, pupose FROM groups; | ||
DROP TABLE groups; | ||
CREATE TABLE groups(id BLOB PRIMARY KEY NOT NULL, created_at_ns BIGINT NOT NULL, membership_state INT NOT NULL, installations_last_checked BIGINT NOT NULL, purpose INT NOT NULL DEFAULT 1); | ||
INSERT INTO groups SELECT id, created_at_ns, membership_state, installations_last_checked, purpose FROM backup_group; | ||
DROP TABLE backup_group; | ||
COMMIT; |
2 changes: 2 additions & 0 deletions
2
xmtp_mls/migrations/2024-04-08-180113_group_added_by_address/up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
ALTER TABLE groups | ||
ADD COLUMN added_by_address TEXT | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zombieobject I think @richardhuaaa was suggesting that this is NOT NULL do you mind doing that in a follow up PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nplasterer I missed that comment just as I was merging the PR. I am more than happy to create a follow up PR to address this request.
For context, there were 2 reasons for the optionality of that parameter. The largest one IMHO was due to MLSGroup lifecycle, being that the address of "who added me" was not always available at group creation. The latter was breaking changes, but as you both stated, better to break things now, to which I concur.
I'll open up a follow up PR with the request immediately and see what I can do to address the lifecycle questions. 🙂