Add support for "enhanced" sendinvite #500
|
@ -75,6 +75,16 @@ type cwtchPeer struct {
|
||||||
experimentsLock sync.Mutex
|
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 {
|
func (cp *cwtchPeer) EnhancedImportBundle(importString string) string {
|
||||||
return cp.ImportBundle(importString).Error()
|
return cp.ImportBundle(importString).Error()
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,6 +53,10 @@ type SendMessages interface {
|
||||||
EnhancedSendMessage(conversation int, message string) string
|
EnhancedSendMessage(conversation int, message string) string
|
||||||
|
|
||||||
SendInviteToConversation(conversationID int, inviteConversationID int) (int, error)
|
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)
|
SendScopedZonedGetValToContact(conversationID int, scope attr.Scope, zone attr.Zone, key string)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue