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

Split send_message into direct and create variants #12

Merged
merged 2 commits into from
Dec 30, 2020
Merged

Split send_message into direct and create variants #12

merged 2 commits into from
Dec 30, 2020

Conversation

megrogan
Copy link
Collaborator

"send_direct_message" will create the chat if is doesn't exist

…age" will create the chat if is doesn't exist
@megrogan megrogan requested a review from hpeebles December 30, 2020 12:55
let chat = ChatEnum::Direct(DirectChat::new(chat_id, sender, recipient, text, now));
let message_id = chat.get_messages(0, 1)[0].get_id();
self.chats.insert(chat_id, chat);
message_id
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is a new chat so this will always be 1

@megrogan megrogan merged commit e1bf06f into master Dec 30, 2020
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.

2 participants