mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-03 08:21:07 +00:00
groups: bug fix to can't invite new user for users who haven't already
been migrated
This commit is contained in:
parent
7c829afb09
commit
658b4aa2a4
1 changed files with 2 additions and 2 deletions
|
|
@ -57,13 +57,13 @@ module.exports.app = (appExports, model, app) ->
|
||||||
|
|
||||||
switch type
|
switch type
|
||||||
when 'guild'
|
when 'guild'
|
||||||
if _.find(profile.invitations.guilds, {id:gid})
|
if profile.invitations?.guilds and _.find(profile.invitations.guilds, {id:gid})
|
||||||
return groupError("User already invited to that group")
|
return groupError("User already invited to that group")
|
||||||
else if uid in group.members
|
else if uid in group.members
|
||||||
return groupError("User already in that group")
|
return groupError("User already in that group")
|
||||||
else invite()
|
else invite()
|
||||||
when 'party'
|
when 'party'
|
||||||
if profile.invitations.party
|
if profile.invitations?.party
|
||||||
return groupError("User already pending invitation.")
|
return groupError("User already pending invitation.")
|
||||||
else if _.find(groups, {type:'party'})
|
else if _.find(groups, {type:'party'})
|
||||||
return groupError("User already in a party.")
|
return groupError("User already in a party.")
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue