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

core: api to create contacts with group members #3053

Merged
merged 14 commits into from
Sep 16, 2023

Conversation

spaced4ndy
Copy link
Contributor

No description provided.

src/Simplex/Chat.hs Outdated Show resolved Hide resolved
src/Simplex/Chat.hs Outdated Show resolved Hide resolved
src/Simplex/Chat.hs Outdated Show resolved Hide resolved
src/Simplex/Chat.hs Outdated Show resolved Hide resolved
-- check direct messages preference
-- auto-join / client setting? (new to_join field if auto join is in UI?)
-- create contact (PendingMemberContact?)
-- if member already has contact, replace it (to not mix messages from connections)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

didn't get it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If contact already exists for member receiving XGrpDirectInv (and doesn't exist for sending member), contact reference on member record will be replaced for the receiving member. Otherwise messages from two connections will be mixed in one contact. Or receiving member could prohibit XGrpDirectInv but then initiating member would never be able to connect directly

src/Simplex/Chat.hs Outdated Show resolved Hide resolved
src/Simplex/Chat.hs Outdated Show resolved Hide resolved
@spaced4ndy spaced4ndy marked this pull request as ready for review September 14, 2023 17:33
@spaced4ndy spaced4ndy changed the base branch from master to member-contact September 15, 2023 16:03
src/Simplex/Chat.hs Outdated Show resolved Hide resolved
@@ -230,6 +230,9 @@ responseToView user_ ChatConfig {logLevel, showReactions, showReceipts, testView
CRGroupLink u g cReq mRole -> ttyUser u $ groupLink_ "Group link:" g cReq mRole
CRGroupLinkDeleted u g -> ttyUser u $ viewGroupLinkDeleted g
CRAcceptingGroupJoinRequest _ g c -> [ttyFullContact c <> ": accepting request to join group " <> ttyGroup' g <> "..."]
CRNewMemberContact u Contact {localDisplayName = c} g m -> ttyUser u ["contact for member " <> ttyGroup' g <> " " <> ttyMember m <> " prepared, use " <> highlight ("/invite member contact @" <> c <> " <message>") <> " to send invitation"]
CRNewMemberContactSentInv u _ct g m -> ttyUser u ["sent invitation to connect directly to member " <> ttyGroup' g <> " " <> ttyMember m]
CRNewMemberContactReceivedInv u ct g m -> ttyUser u [ttyGroup' g <> " " <> ttyMember m <> " is creating direct contact " <> ttyContact' ct <> " with you"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it needs to be shown in terminal when there is a message

@spaced4ndy spaced4ndy merged commit 0e5b164 into member-contact Sep 16, 2023
4 of 6 checks passed
@spaced4ndy spaced4ndy deleted the f/member-contact branch September 16, 2023 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants