Merge pull request 'Add support for "enhanced" sendinvite' (#500) from esi into master
Reviewed-on: #500 Reviewed-by: Dan Ballard <dan@openprivacy.ca>
This commit is contained in:
commit
1717c0ae1a
|
@ -75,6 +75,16 @@ type cwtchPeer struct {
|
|||
experimentsLock sync.Mutex
|
||||
}
|
||||
|
||||
// EnhancedSendInviteMessage encapsulates attempting to send an invite to a conversation and looking up the enhanced message
|
||||
// useful for UIs.
|
||||
func (cp *cwtchPeer) EnhancedSendInviteMessage(conversation int, inviteConversationID int) string {
|
||||
mid, err := cp.SendInviteToConversation(conversation, inviteConversationID)
|
||||
if err == nil {
|
||||
return cp.EnhancedGetMessageById(conversation, mid)
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (cp *cwtchPeer) EnhancedImportBundle(importString string) string {
|
||||
return cp.ImportBundle(importString).Error()
|
||||
}
|
||||
|
|
|
@ -53,6 +53,10 @@ type SendMessages interface {
|
|||
EnhancedSendMessage(conversation int, message string) string
|
||||
|
||||
SendInviteToConversation(conversationID int, inviteConversationID int) (int, error)
|
||||
|
||||
// EnhancedSendInviteMessage Attempts to Send an Invite and Immediately Attempts to Lookup the Message in the Database
|
||||
EnhancedSendInviteMessage(conversation int, inviteConversationID int) string
|
||||
|
||||
SendScopedZonedGetValToContact(conversationID int, scope attr.Scope, zone attr.Zone, key string)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue