Use new mention syntax in the publisher

This commit is contained in:
Steffen van Bergerem 2017-01-30 12:14:25 +01:00
parent f1510ba2d6
commit 408645cccc
No known key found for this signature in database
GPG key ID: 315C9787D548DC6B
2 changed files with 3 additions and 3 deletions

View file

@ -6,7 +6,7 @@ app.views.PublisherMention = app.views.SearchBase.extend({
mentionRegex: /@([^@\s]+)$/,
templates: {
mentionItemSyntax: _.template("@{<%= name %> ; <%= handle %>}"),
mentionItemSyntax: _.template("@{<%= handle %>}"),
mentionItemHighlight: _.template("<strong><span><%= name %></span></strong>")
},

View file

@ -189,7 +189,7 @@ describe("app.views.PublisherMention", function() {
it("sets the correct messageText", function() {
this.view.updateMessageTexts();
expect(this.view.inputBox.data("messageText")).toBe("@user1 Text before @{user1 ; user1@pod.tld}\ntext after");
expect(this.view.inputBox.data("messageText")).toBe("@user1 Text before @{user1@pod.tld}\ntext after");
});
it("formats overlay text to HTML", function() {
@ -468,7 +468,7 @@ describe("app.views.PublisherMention", function() {
this.view.typeaheadInput.typeahead("val", "user");
this.view.typeaheadInput.typeahead("open");
this.view.$(".tt-suggestion").first().click();
expect(this.view.getTextForSubmit()).toBe("@{user1 ; user1@pod.tld}");
expect(this.view.getTextForSubmit()).toBe("@{user1@pod.tld}");
});
it("returns normal text if nobody has been mentioned", function() {