mirror of
https://github.com/hrfee/jfa-go.git
synced 2024-12-28 03:50:10 +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
|
||||
discord := ""
|
||||
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)
|
||||
if len(users) == 0 {
|
||||
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++) {
|
||||
const navigate = (event: Event) => {
|
||||
event.preventDefault();
|
||||
window.tabs.switch("invites");
|
||||
document.dispatchEvent(inviteURLEvent(pseudoInvites[i].getAttribute("data-id")));
|
||||
window.history.pushState(null, document.title, pseudoInvites[i].getAttribute("data-href"));
|
||||
window.invites.reload(() => {
|
||||
window.tabs.switch("invites");
|
||||
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].onkeydown = navigate;
|
||||
@ -462,6 +464,7 @@ export class activityList {
|
||||
this._search.onSearchBoxChange(true);
|
||||
this._loadAllButton.classList.remove("unfocused");
|
||||
} else {
|
||||
this.shown = this.loaded;
|
||||
this.setVisibility(this._ordering, true);
|
||||
this._loadAllButton.classList.add("unfocused");
|
||||
this._notFoundPanel.classList.add("unfocused");
|
||||
|
Loading…
Reference in New Issue
Block a user