mirror of
https://github.com/hrfee/jfa-go.git
synced 2024-12-29 12:30:11 +00:00
Compare commits
4 Commits
44d7e173e3
...
3739634b63
Author | SHA1 | Date | |
---|---|---|---|
3739634b63 | |||
3951116bdc | |||
a288ba4461 | |||
f34ba5df18 |
@ -214,7 +214,7 @@ func (app *appContext) GenerateInvite(gc *gin.Context) {
|
|||||||
addressValid := false
|
addressValid := false
|
||||||
discord := ""
|
discord := ""
|
||||||
app.debug.Printf("%s: Sending invite message", invite.Code)
|
app.debug.Printf("%s: Sending invite message", invite.Code)
|
||||||
if discordEnabled && !strings.Contains(req.SendTo, "@") {
|
if discordEnabled && (!strings.Contains(req.SendTo, "@") || strings.HasPrefix(req.SendTo, "@")) {
|
||||||
users := app.discord.GetUsers(req.SendTo)
|
users := app.discord.GetUsers(req.SendTo)
|
||||||
if len(users) == 0 {
|
if len(users) == 0 {
|
||||||
invite.SendTo = fmt.Sprintf("Failed: User not found: \"%s\"", req.SendTo)
|
invite.SendTo = fmt.Sprintf("Failed: User not found: \"%s\"", req.SendTo)
|
||||||
|
@ -305,9 +305,11 @@ export class Activity implements activity, SearchableItem {
|
|||||||
for (let i = 0; i < pseudoInvites.length; i++) {
|
for (let i = 0; i < pseudoInvites.length; i++) {
|
||||||
const navigate = (event: Event) => {
|
const navigate = (event: Event) => {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
window.tabs.switch("invites");
|
window.invites.reload(() => {
|
||||||
document.dispatchEvent(inviteURLEvent(pseudoInvites[i].getAttribute("data-id")));
|
window.tabs.switch("invites");
|
||||||
window.history.pushState(null, document.title, pseudoInvites[i].getAttribute("data-href"));
|
document.dispatchEvent(inviteURLEvent(pseudoInvites[i].getAttribute("data-id")));
|
||||||
|
window.history.pushState(null, document.title, pseudoInvites[i].getAttribute("data-href"));
|
||||||
|
});
|
||||||
}
|
}
|
||||||
pseudoInvites[i].onclick = navigate;
|
pseudoInvites[i].onclick = navigate;
|
||||||
pseudoInvites[i].onkeydown = navigate;
|
pseudoInvites[i].onkeydown = navigate;
|
||||||
@ -462,6 +464,7 @@ export class activityList {
|
|||||||
this._search.onSearchBoxChange(true);
|
this._search.onSearchBoxChange(true);
|
||||||
this._loadAllButton.classList.remove("unfocused");
|
this._loadAllButton.classList.remove("unfocused");
|
||||||
} else {
|
} else {
|
||||||
|
this.shown = this.loaded;
|
||||||
this.setVisibility(this._ordering, true);
|
this.setVisibility(this._ordering, true);
|
||||||
this._loadAllButton.classList.add("unfocused");
|
this._loadAllButton.classList.add("unfocused");
|
||||||
this._notFoundPanel.classList.add("unfocused");
|
this._notFoundPanel.classList.add("unfocused");
|
||||||
|
Loading…
Reference in New Issue
Block a user