Fix mention parsing
This commit is contained in:
parent
5d5e6d986d
commit
8aaa5103c4
@ -93,6 +93,7 @@ export default class Connection {
|
|||||||
AddSubscription(sub) {
|
AddSubscription(sub) {
|
||||||
let subObj = sub.ToObject();
|
let subObj = sub.ToObject();
|
||||||
if (Object.keys(subObj).length === 0) {
|
if (Object.keys(subObj).length === 0) {
|
||||||
|
debugger;
|
||||||
throw "CANNOT SEND EMPTY SUB - FIX ME";
|
throw "CANNOT SEND EMPTY SUB - FIX ME";
|
||||||
}
|
}
|
||||||
let req = ["REQ", sub.Id, subObj];
|
let req = ["REQ", sub.Id, subObj];
|
||||||
|
@ -39,6 +39,7 @@ export default class Thread {
|
|||||||
let reply = eTags.find(a => a.Marker === "reply");
|
let reply = eTags.find(a => a.Marker === "reply");
|
||||||
ret.Root = root;
|
ret.Root = root;
|
||||||
ret.ReplyTo = reply;
|
ret.ReplyTo = reply;
|
||||||
|
ret.Mentions = eTags.filter(a => a.Marker === "mention");
|
||||||
}
|
}
|
||||||
ret.PubKeys = ev.Tags.filter(a => a.Key === "p").map(a => a.PubKey);
|
ret.PubKeys = ev.Tags.filter(a => a.Key === "p").map(a => a.PubKey);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user